In a Teams meeting, the meeting organizer can choose exactly when the meeting will end and ensure that everyone leaves the meeting at the same time.
When the meeting organizer is ready to end the meeting, they can click the drop-down next to the red Leave button. Then select End meeting. This action will end the meeting for all participants at the same time.