I am a driver and a cyclist and if I see a cyclist I give them plenty of room regardless of a helmet or not. I really cannot imagine drivers going through the thought process of "He has a helmet, he must be experienced, I dont need to give him that much room". It really doesnt make much sense to me.
Just as an add on. I dont believe motorists are to blame for everything. I have seen some awful cycling. We are certainly not blameless.
Risk compensation is largely subconscious.
So it's not a "thought process" as such, but rather a driver sees a helmeted rider and subconsciously receives the message that they are "safer" than an unhelmeted one, and so take less care around them.