Fixes https://bugs.dolphin-emu.org/issues/12087
The current approach results in the UI thread creating a graphics device whilst the core is running, leading to races on function pointers, and potentially crashing.