My 2022 Y started doing that since the last service a month or so ago. They replaced the left pillar camera and I can’t imagine that would be the cause.
It sound exactly like a rock hitting the windshield. Happens only after the car has been sitting outside for a few hours, in moderate weather.