Options to check if a NPC can see your or not lot of different things tryed out

Tryed some different solutions now, and so fare no luck.

First native i tryed out HasEntityClearLosToEntityInFront and HasEntityClearLosToEntity it seems very very very flaky to be honest, not any stable result.

HasEntityClearLosToEntity in generel just says true all the time even if you are behind a building so that is a bit f***** up, even CanPedSeePed and StartShapeTestLosProbe.

So fare not found a stable method any one got a hint or an idea ?