"Window creation failed" on second SDL_CreateWindow call after "opening" the app again

Hey everyone,

We are using SDL2 and SDL_gpu to render part of an Android App (a “subapp”), which gets opened and closed several times.

Every time this “subapp” rendered with SDL_gpu gets opened, we create a new Window & GPU_TARGET with GPU_Init (GPU_Init internally calls SDL_CreateWindow).
After the “subapp” is closed we call GPU_Quit to clean the renderer state and shutdown SDL_gpu.

When the “subapp” is opened the second time SDL_CreateWindow fails within GPU_Init due to “Window creation failed”.

Here the error logs:

GPU_Init: BACKEND ERROR - Window creation failed.
GPU_InitRendererByID: BACKEND ERROR - Renderer OpenGLES 3 failed to initialize properly
GPU_Init: BACKEND ERROR - Window creation failed.
GPU_InitRendererByID: BACKEND ERROR - Renderer OpenGLES 2 failed to initialize properly
GPU_Init: BACKEND ERROR - Window creation failed.
GPU_InitRendererByID: BACKEND ERROR - Renderer OpenGLES 1 failed to initialize properly
GPU_Init: BACKEND ERROR - No renderer out of 3 was able to initialize properly

Thanks in advance for any help to solve this.