already solved
in the leaveUrl I directed it to a new example page [leaveUrl: “/endmeeting.html”] and on that page I put what is seen in the image and with that when the user leaves the meeting the window automatically closes.