sudo dnf remove \
--duplicates \
--releasever 40 \
--setopt protected_packages=
sudo dnf distro-sync \
--refresh \
--releasever 40 \
--setopt protected_packages=
If the issue persists, use the following:
sudo sed -i -e 's/^/#/' /etc/dnf/protected.d/*