So Tama just snuck in an enemy ship with a big ass dog and no one noticed? lol
I think this is the only explanatation until Oda decides to give more edetails:
She snuck out of Tengu's house
Traveled miles to the Udon prison by herself
Got a ship somehow and made the gifters take her to Onigashima
No plothole