Newer Windows versions are also displaying a 256x256 icon. If this icon size is not present, the 48x48 icon is used, but not resized. This means there is a possibly large empty area around the icon.
cmake/modules/ECMAddAppIcon.cmake is heavily patched to support sidebar icons, OUTFILE_BASE parameter and to not include 64 and 64@2x icons on macOS which are not supported. All changes are made in a way that we can upstream this.