"Couldn't find monitor data" error when reopening monitor

COMPILER: x86_64-w64-mingw32-gcc
OS: Windows 10 Professional 17763.1518
ERROR Message: “Couldn’t find monitor data”

My application uses SDL2 to create a window for rendering video. The window disappears after I switch from windowed mode to fullscreen with calling SDL_SetWindowFullscreen and SDL_GetError() prints “Couldn’t find monitor data”. The error ALWAYS and ONLY occurs when I change the status of my monitors like turn-on and turn-off or switching from multi displays to single display.

The ERROR message is found in SDL_windowsmode.c when SDL tries to call System API GetMonitorInfo().

It seems SDL2 is not able to handle with the situation where the state of a physical monitor is changed(e.g. turn on/turn off or extending screen);p

However, If there are any misuses of SDL functions, please share your proper example with me. I would be very grateful.

Basic logic of my application

// Init my window when my event loop receives a STARTMIRRO event

 // When my event loop receives a AVFrame
SDL_UpdateYUVTexture(my_texture, NULL, ...);
SDL_RenderCopy(my_renderer, my_texture);

// When my event loop receives a FULLSCREEN event
SDL_SetWindowFullscreen(my_window, mode);
// SDL_GetError() prints "Couldn't found monitor data" three times

An issue in Github is opend here: [BUG] "Couldn't find monitor data" error when reopening monitor · Issue #4251 · libsdl-org/SDL · GitHub