/tp doesn't work while you are in a minecart or a boat. The console will say "Teleported (player) to (coordinates)" but you won't go anywhere. Getting out doesn't cause you to move either.
Related issues
Comments

Does this also happen when in a boat?
I'll get to that.
Yes it does.
Confirmed for boats also.
Duplicate of MC-16.
Can confirm.