For Linux, there's a kernel setting for that.
Just run
sysctl -w net.ipv6.bindv6only=1
so IPv6 will not include IPv4-mapped addresses.https://www.kernel.org/doc/Documentation/networking/ip-sysct...