That either happens because you enter the boat too fast sometimes using the bed, or you are moving around on the boat when the boat has started moving. (not fully sure why, but that is usually the reason why it goes back)