@Mihal, Klaudia , Thanks for posting this question.
This is known limitation documented. It is by design as browsers, when refreshed or closed, they do not reliably allow information to be sent to a service (because the connection is being terminated). While there might be some instances where a request is successfully sent, there is no guarantee of it working consistently.
Kindly checkout this doc section "Refreshing a page doesn't immediately remove the user from their call"
If a user is in a call and decides to refresh the page, the Communication Services media service won't remove this user immediately from the call. It will wait for the user to rejoin. The user will be removed from the call after the media service times out. It's best to build user experiences that don't require end users to refresh the page of your application while in a call. If a user refreshes the page, reuse the same Communication Services user ID after that user returns back to the application. By rejoining with the same user ID, the user is represented as the same, existing object in the
remoteParticipantscollection. From the perspective of other participants in the call, the user remains in the call during the time it takes to refresh the page, up to a minute or two. If the user was sending video before refreshing, the
videoStreamscollection will keep the previous stream information until the service times out and removes it. In this scenario, the application might decide to observe any new streams added to the collection, and render one with the highest
If the answer helped (pointed, you in the right direction) > please click Accept Answer Or please share the requested/more info to help you better.