Upgrade F39 to F40. Problem with protected packages shim-ia32 and shim-x64

While upgrading I get this error:

Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: Fedora 40 - x86_64                              3.7 kB/s | 3.0 kB     00:00    
Fedora 40 openh264 (From Cisco) - x86_64        1.5 kB/s | 989  B     00:00    
Fedora 40 - x86_64 - Updates                    218 kB/s |  60 kB     00:00    
google-chrome                                    12 kB/s | 1.3 kB     00:00    
RPM Fusion for Fedora 40 - Free                  11 kB/s |  12 kB     00:01    
RPM Fusion for Fedora 40 - Free - Updates       9.6 kB/s |  11 kB     00:01    
RPM Fusion for Fedora 40 - Nonfree               14 kB/s |  17 kB     00:01    
RPM Fusion for Fedora 40 - Nonfree - Updates    3.9 kB/s | 3.2 kB     00:00    
No match for group package "scim-sayura"
No match for group package "samyak-devanagari-fonts"
No match for group package "layla-diwani-fonts"
[... MANY MORE OF THESE ...]
No match for group package "lohit-malayalam-fonts"
No match for group package "paktype-ajrak-fonts"
No match for group package "lohit-nepali-fonts"
No match for group package "baekmuk-ttf-hline-fonts"
Error: 
 Problem: The operation would result in removing the following protected packages: shim-ia32, shim-x64

What can I do with the protected packages problem (shim-ia32, shim-x64)? I found somewhere that I can skip the protection by commenting the files in /etc/dnf/protected.d/shim.conf but I’m afraid that that can cause a problem with UEFI.

one answer is here

You can do that and then you get a list showing the real problems. You definitely do not want to remove the shim packages. But first try with adding the option --noautoremove to the command and then see what happens.