[UE4.27] Unreal Engine deleted my C++ source code after compilation

Hi all, I am recently trying to add C++/WinRT code into my UE project. Below is the part of my C++/WinRT code.

When I did the first time compilation, everything is fine. But when compiled my code second time. It showed an error said the stuff I’ve already written under my class in C++ is not a member of that class.

So when I checked my code again, it all got deleted…

Has anyone had the same issue and know how to solve it?? Thanks alot!!