Best practice vs using GetCachedGeometry() for viewport size

Hi,

Documentation for GetChachedGemoetry() says to avoid using it:

“We recommend not to use this data unless there’s no other way to solve your problem…”

However, if I use other methods i.e.

GEngine->GameViewport->Viewport->GetSizeXY()

or

APlayerController::GetViewportSize

I always get an incorrect size. I am running these calls inside a UserWidget that fills the whole viewport. On the other hand, GetCachedGeometry().GetLocalSize(), always gives me the correct value after the widget ticks. So what is the better way?

Thanks!