SDL_CreateWindowFrom() and missing events

When I use SDL_CreateWindowFrom() to create a window inside a pre-existing window (as a VST3 plugin in Windows) some events like SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST are missing entirely, while other similar events are still present. Also wrapping the mouse behaves in a strange way (I haven’t yet figured out why, but it seems that there’s a lack of relative mouse movement events and other issues too). None of these problems are present when I use the exact same setup but use SDL_CreateWindow() to create a separate second window. Does anyone know what’s going on?

Here’s how I do the window initialisation:
I also call this afterwards:

	SetParent(plugin_hwnd, parent_hwnd);
	DefWindowProcA(plugin_hwnd, WM_UPDATEUISTATE, UIS_CLEAR, WS_POPUP);
	DefWindowProcA(plugin_hwnd, WM_UPDATEUISTATE, UIS_SET, WS_CHILD);