DialogService dont close window

Hello, I have problem with close dialog window. I open Dialog with this code

DialogService.Open($"Nový zákazník",
new Dictionary<string, object> { { "CustomerType", $"{type}" } },
new DialogOptions() { Width = "75%", Height = "75%" });

When I click on close button in right top corner or use DialogService.Close() nothing do happend. Intresting is when I refresh page, everything works fine. Then i go to differrent page and when i get back, the problem is back and I cannot close the opened dialog. When i refresh page, everything works fine again. There is no logs in console, no errors, there is nothing to catch. When i used the same code on differrent page everything worsk fine. Can someone help me please. Thanks a lot.

Sorry, I open Dialog with this code
DialogService.Open<NewCustomerDetail>($"Nový zákazník", new Dictionary<string, object> { { "CustomerType", $"{type}" } }, new DialogOptions() { Width = "75%", Height = "75%" });

Hello, on the end i found the solution. It was in DialogService OnClose method. I Hope it help someon.