I also had this problem on a 2021 CX-5. After a bit of back and forth, the dealer resealed the windscreen (didn't replace the glass but redid the adhesive). Seems to have fixed the problem thankfully, as the noise was insanely annoying!
View attachment 329971
All these vids sound the exact same as mine. Bought used 21 Carbon AWD with 20k on it. I have figured warmer weather but not hot makes it worse. It's quiet as a mouse in the am on way to work. Once it warms up a the end of the day, it's creaking all the way home. So far nothing I yank on in or under the dash makes noise but it sounds identical to all these videos.
I"ll reach out to a local glass company ( Safelight or similar) to see if they can reinstall it.
J
This is 100% due to your windshield.
I had the same issue, my comment and video is further up. My local dealership finally sent my vehicle in to a glass shop, had my windshield taken out and reset back in. This was done about May 30th and I have no heard the noise since!!!! Mazda needs to recall this. If your local dealer or Mazda won’t help you maybe check with a glass company to see what they will charge you out of pocket to take your current windshield out and reset it back in.