I would have thought so too but Naval Gazing has a short series [0] on why it's not as dire as one might think. An aircraft carrier's location being "secret" in this case is just one layer of the survivability onion [1] anyhow. (Caveat that as someone who takes a casual interest in this, I can't vouch for accurate this is at all.)
[0] https://www.navalgazing.net/Carrier-Doom-Part-1
[1] https://www.goonhammer.com/star-wars-armada-naval-academy-wa...
Not hidden from nation states with access to real-time satellite imagery, but more rustic guerilla operations usually don't have such sophisticated access
Well everything's impossible, until its not.
It is important to note the Naval Gazing article is specifically talking about the difficulties of actually targeting a ship for a successful kill rather than just tracking it. It's in response to the idea that satellites plus missiles would mean carriers could be instantly destroyed in a first round of hostilities with a sufficiently prepared opponent. Tracking is a lot easier to do than getting data fresh and precise enough to hit the ship with no other tools (eg ships already nearby that can get a live precise track vs terminal detection and guidance on the missile itself).
Also the capabilities of commercial and government geospatial systems has only continued to improve in the ~decade since the article was written.