I learned, some time ago, that programs such as dnf don't actually look at /etc/fedora-release, they find out what version of fedora-release.noarch.rpm you have installed. A bit weird, but true. And, if an incomplete upgrade leaves two versions listed in its database, it will use the first one it finds, which will be the earliest of them. Using
sudo dnf list installed fedora-release.noarch
will tell you if that's happened and if so, you can use either dnf or rpm to remove whichever one doesn't belong.