I had some issues trying to troubleshoot unlock of my Xperia 5 IV using Windows 10, and finally got it to work, adding some brief notes here for anyone else running into the issue.
running:
.\fastboot.exe oem unlock 0xXXXXXXXXXXXXXXXX
I got
FAILED (remote: 'Command not supported in default implementation')
A few things here, first I tried this using 'fastbootd' (gotten there by powerbutton + volume down, and browsing to fastboot) This is differen't than the fastboot you get to via holding Volume Up while plugging into the PC, but it's confusing since fastboot devices
works even with default drivers. You know you are in the correct fastboot because the screen remains black, and the LED lights up as and stays 'blue'.