I had the same issue and non of the above helped. What helped, removing the jumpers that connects the target board and st-link (in case NUCLEO411RE it was on CN2). Then using the old ST-LINK Utility `s ST-LinkUpgrade.exe could only reflash my ST-Link.