Have you tried compiling the code through the editor?
I constantly face such “ridiculous errors” but the code compiles and works as expected. I may be wrong (sure hope so), but unfortunately it seems Intellisense is just not suited for Unreal… so I just “learned” to mostly ignore it and pay attention to error logs in Unreal.