Having dirty or obscured number plates is also illegal.
Clear nail varnish adds a layer of clear resin. Since the number plate is clear plastic anyway simply adding more clear material doesn't make them anti-flash. What's required is something that will reflect the glare directly back at the camera. Since its practically imposible to have something that does that, the best you can hope for is a slightly obscured number plate by reflecting some of the glare. Uneven layers of nail varnish may achieve this but a better way is to wrap the plate in clingfilm in a very messy manner. But there's no guarantee that all, or even, some of the numbers will be obscured. Plus, the local Pigs driving behind you can see clingfilm wrapped around it and pull you for it.
What you can do is make an ingenious number plate hiding machanism. At the touch of a button the plate folds down so that its numbers can't be seen at all. A wiper motor can be employed for the task but requires modification to your car bodywork.