A VPN doesn’t protect you against that. Fingerprinting is a complex thing and it’s very difficult to solve.
The best way to avoid it is using Tor Browser because it combines a lot of functionalities for that. From the Tor network (the effect is similar to a VPN but even better) to the size of the browser’s window to avoid being tracked with it and everything in between.
You can detect a device as unique using many things, that’s why this is a difficult problem. It can make use of the IP, the fonts installed in the system, the User Agent, the language, the size of the screen, the capabilities of the system and many things more. The idea is that every user has a very specific setup and they can be distinguished. The only good way is to convince a large group of people to install an app which lies in the parameters in the same way like Tor Browser does.
I think Firefox is merging some changes from the Tor Browser to fight against fingerprinting but that will take some time to be released.