It is not app fault. Nor fdroid.
It is a bug: Google Issue Tracker
Install a ROM where the bug is fixed, like Lineage, or blame your vendor because it didn’t include a fix for a bug that affects the whole platform.
It is not usually a dev task to know framework oddities like this one. Also play sore apps are not affected as they don’t use the PackageInstaller the same way