The bug is still present in the latest Xcode (14.3) with projects that were created on older Xcode versions.
To fix it, simply create a new asset catalog. Interestingly, an empty one will do, but I just moved my app icons to it and deleted the old one made with the previous Xcode version.
Of course (because it would have been too simple), there is an additional bug with Xcode 14.3 - if you try to create a full icon set and set your target to iOS 11, upon submission to the app store you will get a warning about having a single-side app icon in the bundle with an iOS version less than 12.
Edit: Updating to 14.3.1 will not fix the bug either. It might actually bring back the warning, so you'd have to again create a new asset catalog.
Could not get trait set for device Watch6,9 with version 9.1
– DisrateCould not get trait set for device iPad14,5 with version 16.2
– Loincloth