Right now the recording continues if at least one person is still in the meeting. This will lead to potential unlimited recording. Why not stopping the recording after X minutes of silence/inactivity?
Maybe prompting a message to the client saying: The meeting looks inactive, the recording will be stopped in 1 minutes. To continue recording press "Continue".
S P commented
For all those that voted for this, please vote for this one also - https://microsoftteams.uservoice.com/forums/555103-public/suggestions/36283858-stop-recording-on-exit