This question came up the other day during a session where we have an airship that is basically a hot air balloon attached to a ship and is powered by elementals (Fire elemental for the balloon and air elementals for the propulsion).
While we were on the ship we were attacked by a dragon which landed on the ship. This was fine because we hadn't started moving yet. During the fight one of our PCs initiated the ship bringing it into constant motion. This wouldn't be a problem except that the dragon repeatedly flew off the ship to get a better angle for its breath weapon then landed back on the ship before its turn was over. The reason this was an issue is that the ship moves faster than the dragon. Since it was the dragon's turn it just ignored this as if the ship were standing still even though it was in constant motion.
Is there a good way to solve the problem of moving on and off something in constant motion or are we and the DM just missing something in the rules?
Some furhter details: The dragon has a fly speed of 80ft and never dashed while the ship has a speed of 220ft per round. There was no driver for the ship. The PC started it up and returned to combat. It was traveling through the air in a straight line. Relative motion wouldn’t apply due to the dragons ability to fly against the direction the ship was traveling and still catch back up.