problem with including UMG in the dependicies

the error : Expecting to find a type to be declared in a target rules named ‘MAINEditorTarget’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool
i noticed this error happening when im adding “UMG” to the dependencies and it doesnt stop after removing it
i noticed that using UnrealBuildTool; disappears too and even if i rewrite it after saving or compiling it disappear again