pyanaconda/core/util.py has a resetRpmDB() function which hardcodes `/var/lib/rpm` as the RPM database location. But it's not any more: https://bugzilla.redhat.com/show_bug.cgi?id=2042099 so, that function - if it's still relevant - might need updating to consider the new location too.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
Taking, needs more looking. - Weird use of the mentioned function, looks like it might not be useful anymore. - There are more locations hardcoding the path.
One of the PRs to address this: https://github.com/rhinstaller/anaconda/pull/3874
Another and hopefully last PR: https://github.com/rhinstaller/anaconda/pull/3934
Both PRs merged for f36, but we're currently doing only patch builds so not released yet.