To be fair, we still don’t know that it isn’t his home planet. Where did Yaddle and Grogu come from? Their people don’t even have a name! If ever there was a species whose home world would be entirely unknown to the Republic, it’s them.
The only downside to this theory is the dearth of anyone else on Dagobah. Is Grogu the last of his kind? Did some kind of catastrophe wipe out everyone on the planet sometime before ROTS? (echoes of the old “Naboo will become Dagobah” theory from the early 2000s). On the other hand, how and why did Yoda come to know of Dagobah?
I guess it can’t be entirely unknown, since Luke was able to get there after a ghost told him the name of the system (and nothing else).