Fingerprinting works by collecting bits of information about the browser and device to identify users. Couldn’t browsers like Firefox see when a website gets such info with JS and either prevent or ask permission from the user for the website to make HTTP requests to upload such information to the website. Idk if they do something like this already.
It would at least be a very intensive process to do so, and that doesn’t even solve that there would be other ways to glean the same information without accessing it directly. For example, one could create an element with 100% screen width set by CSS and query the element’s size instead of using the simpler window.innerHeight. How do you detect every possible way a script could determine the viewport dimensions?