GameModeBase.h inaccessible even though its included in the header file

currently trying to make a game and i cant get the GameModeBase.h to work i keep getting an error saying the gamemodebase is inaccessible any suggested fixes

Did you include it via

#include "GameFramework/GameModeBase.h"

Do your dependencies in the build.cs file have the “Engine” module?