I know that it is correct behavior for dnf to overwrite the PATCH installed with rpm.
postgresql was reported index problems 14.0-14.3 , we do like tu use 14.4 .
Since Rocky/RHEL 9 doesn’t have a Postgres 14.x, it only has by default Postgres 13, or a module stream for Postgres 15, then the problem has nothing to do with Rocky/RHEL.
The postgres community repository has a lot of versions in their repository. It shouldn’t downgrade on it’s own. Most likely is misconfiguration on your server that has done this. But since the package has come from the postgres repository, you should be asking on their forums as to why it happened. Although I suggest you check your system first to make sure it’s not user-error on your part.