For the time being, the only solution is the one you have already arrived at: Do not use an SD card as phone storage, set it up as portable storage instead. This is a longstanding issue since the upgrade to Android 10, and I don’t know if it affects other phones as well.
The downside to this solution is that some popular apps (like Whatsapp, yes) won’t store any media on an SD card formatted as portable storage. While you might be able to manually move (via file manager) the media embedded into Whatsapp to the SD card, it will make them not show in Whatsapp anymore.