FYI I have the same issue when building using Android NDK and linking shared library against static libidn2:
C/C++: ld: error: /home/alexey/projects/tremotesf-android/libtremotesf/.vcpkg_installed_arm64-android/arm64-android/lib/libidn2.a(puny_decode.o): symbol _idn2_punycode_decode@IDN2_0.0.0 has undefined version IDN2_0.0.0
Android NDK is based on LLVM 14 and uses lld for linking.
Patching config.h is not convenient since it would mean copying vcpkg buildscript for libidn2 and maintaining the modified version manually (unless it can be done via some special ./configure option or adding something to CFLAGS).