Deriving class from WebBrowser causes linker errors

Hi,

I created a WebBrowser derived class in the editor. However, that caused immediately a big bunch of linker errors.

Severity	Code	Description
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UVisual::BeginDestroy(void)" (?BeginDestroy@UVisual@@UEAAXXZ)
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UVisual::BeginDestroy(void)" (?BeginDestroy@UVisual@@UEAAXXZ)
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UWidget::ConnectEditorData(void)" (?ConnectEditorData@UWidget@@UEAAXXZ)
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UWidget::ConnectEditorData(void)" (?ConnectEditorData@UWidget@@UEAAXXZ)
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UWidget::FinishDestroy(void)" (?FinishDestroy@UWidget@@UEAAXXZ)
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl UWidget::FinishDestroy(void)" (?FinishDestroy@UWidget@@UEAAXXZ) 
...

I have included WebBrowser in the dependencies like this

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "WebBrowser" });

But it does not help.

What might be wrong?

Interesting notification is that if I start a clean project in 4.21.1, the WebBrowser is not available as a base class in the editor list.

In my project with the above errors, I am using a project that is originally created in UE 4.20.3 source version.