For me this problem was only a symptom of a deeper problem with package duplicates that had remained from fedora 37. I would highly recommend looking into the thread mentioned by @vgaetera. His solution was also quite helpful in my eventual resolution of the problem. A simple marker to see if you are having the same issue is to run the following command and if the result is a number greater than 0, you most likely are.
sudo dnf repoquery --duplicates | wc -l