So I heard this sentence and also few contradictions about that. Does it mean that when they entered, he was already gone because he had there been before them? Or he just was there before them and still is..
It looks as if something has been left out from this sentence, the meaning isn't clear as it is. It would look natural like this:
When we entered, we realised he had already been there.(Meaning: he went there and left before we did.)
I suppose it is the choice of the verbs used in the initial sentence that doesn't make the meaning clear. If you want to express that he was there before we went to the particular place, then you should say "When we entered he had already arrived" or "When we entered he was already there."
In general any place that you have been to is a place where you no longer are. So:
- I've been to the bank
implies I went the bank and am now back. Similarly:
- I've been there
implies that I am no longer wherever there is.
If, however, a time adverbial is added to the sentence, then the verb to be probably no longer has the meaning of going to and returning from a place but simply of being in a place. In such a case,
- When we arrived, he had been there for 10 minutes
is, by itself, ambiguous. It could mean he was still there, or that he had been there and was now gone - although the former is more likely.
The statement on its own is ambiguous, but it read to me as when we entered, we saw evidence that he had been there but was now gone. That's how I would read it without further information.