Since this isn’t in the steps described in Upgrading with DNF, at least for the standard install process, and this fixed things for the OP, I guess I’m wondering whether we should all be doing this immediately have doing the sudo dnf upgrade --refresh step. Are you suggesting that we should?
It is often the case that fixes to the upgrade process are ship late in the day.
For example there is a fix for upgrading Raspberry Pi in f38 that is required.
So I follow the process that you MUST do a dnf update --refresh before a system
upgrade. It used to be recommended part of the upgrade process.