https://www.reddit.com/r/Volvo/comme..._full_of_water
So basically like this story? Pine is especially bad for clogging these I think due to pollen, needles and sap. Sunroof drains clogged can cause this (which is a stupid design as there's quite a few vehicles this happens to IIRC, even in luxury ones).
Double check the roof and window seals and verify it is indeed closed 100% (ie: I don't ever use that button, but someone accidentally bumped it for a second while pushing a different button one time).
Use AI or Youtube to find the specific drains/locations/ideas for clearing on your specific vehicle. It likely exists.
Unclog the drains, swap out the cabin and air filters as an initial inexpensive diagnostic point and see where things are at. Methyl hydrate to dissolve sap as needed (there's no way to explain how damn good it works vs other options for sap), but careful of its effect on the paint and plastics. Rinse/wash off ASAP and reapply protectant as needed.
Try to park elsewhere and maybe allow for a crack in the window so the moisture can dissipate? Don't want excess moisture in the cabin wrecking stuff or causing mold etc.
Also be careful if there's water accumulating in the footwells. Apparently there's lot of semi exposed wires in bundles there, and some not fully sealed with heat shrink etc. (which seems weird to me). I don't know if the XC60 is like that. Longer term oxidization of wires in the water and shorts could potentially happen if it's wet. This means it could suddenly cause all sorts of funky warning lights or other electronics to stop functioning properly. If nothing pops up for that, then I don't think you need to investigate, but even in some luxury cars, I don't get why those supposed wire bundles aren't wrapped up in like $50 of additional heat shrink for the entire vehicle. Silly stuff.
If you do this and it's still happening, you have an idea what it's not and it'll help you consider other option of what the issue could be.