Flatpaks might be the solution here. Flatpaks run in containers, they might have isolated machine-id already.
Though tbh if you don't trust the apps on your Linux system, you have more to worry about than fingerprinting. Regular executable binaries and system packages have zero isolation, any malware can wreak havoc. Flatpaks are getting there but many apps still ask for permissions they don't need, increasing risk.
For untrusted apps, run them in a browser (if a web-app), a container/distrobox, or a VM.