The Player Vehicle Desync Fix [Fabric] Mod 1.17.1 provides you with a solution to handle an issue. It fixes the config object structure for server support.

Overview
Invoking ServerPlayerEntity.startRiding(vehicle) on server-side while that vehicle is distant. Or, even you cannot load it so it can create weird behavior like:
Players teleporting to the means for riding
Players go around from the client’s perspective while the server believes they’re riding. That makes them impossible to interact with others who are not near the vehicle. That happens because they’re at an unreachable distance on the server side.
Pressing the Dismount button makes the player dismount next to the vehicle which is similar to teleporting to it from the client’s perspective.
If the vehicle’s in the midst of teleportation on the client-side, teleportation stops at that point. At that time, players also ride it on the client-side. So, they might get stuck in the middle of blocks.
Solutions
The server keeps sending riding status synchronization packet if finding desync on the riding status
Client getting that packet checks if the target is around the character before calling to block the effect
Player Vehicle Desync Fix is a miscellaneous mod.