How to check if an actor is occluded?

you can do a trace, perhaps on visibility or a specific profile
If the trace returns a blocking hit then that means that the interactable is blocked

you should probably add both the player and the object as ignored actors in the trace, and it should be fine