Can't use Pawn-derived object as a parameter to Interface's Execute_

I have an Enemy class, Player class and an Enemy Interface.
When I try to fire this code

if (FocusEnemy != nullptr)
{
	IEnemyInterface::Execute_DeselectThisActor(FocusEnemy);
}

where FocusEnemy is in Player.h

 UPROPERTY(BlueprintReadWrite)
AEnemyBase* FocusEnemy;

Compiler says argument of type "AEnemyBase" is incompatible with parameter of type "UObject"**

It can be fixed by adding include “EnemyBase.h” to Player.h, but isn’t this solution breaks whole purpose of interfaces by creating dependency from Player to Enemy? What the point in using interfaces then? Got a little confused trying to compare UE’s logic to my knowledge…

Well I understand however these are actors in the end and why don’t you declare them as just actors?

Do they have to know each others base classes? Cause afaik they don’t need to know just to communicate. You can ask an actor if has interface and through that interface you can say something.

if (MyObject->GetClass()->ImplementsInterface(UMyInterface::StaticClass()))
IMyInterface::Execute_MyFunction(MyObject, MyArg);

1- You have a focus function and you focused an actor. Doesn’t even have to be an enemy.
2-However OnFocus->RunFunctionCheckInterface (or whatever gameplay logic you have)
3-Tell object you are now focused. On interface you can call listeners as now you are focused (bool or whatever)

https://dev.epicgames.com/documentation/en-us/unreal-engine/interfaces-in-unreal-engine?application_version=5.4