I've often thought that, if I were to travel regularly by bike, I'd get a pool noodle and strap it to my frame so I have the legally mandated 3' of distance.
Then I'd put paintballs in the far end and then I could tell who broke the law.
Wait, 3 feet???? That's legally mandated??? What country do you reside in? I have cars coming within mere inches of me whenever I make the mistake of riding my bike on the road! Getting clipped twice as a teen by cars going 45 mph also instilled a huge fear into me, and I was absolutely hugging the curb!
1.5m in Spain. Super rare for anyone to get closer and if it does it's probably a tourist. All drivers will just follow you until it's safe to pass even if you're going uphill.