There was a time when there was no penalty and players abused it. They would not move, would refuse to do anything in a dungeon and demand to be kicked to avoid any penalty of leaving.
So it does not matter if you leave or are kicked you have deserted either way.
Dungeons are a team effort the onus is on the players to get on with the task as a group. Even if they are doing things you don’t want. You have to go with the flow.