>on Alpine OS I could get it working fine by installing some dependencies and recompiling Vim manually
maybe the mantainers of the vim package didn't use sensible build flags?
vim copy-pasting usually works out-of-the-box on Debian/Ubuntu and Fedora, I avoid small and cutting-edge distributions exactly because of quirks like this