Look at camera in VR

I’ve a script which I attach to entities that I always want to look at camera.
Here’s the script

LookAtCamera.prototype.initialize = function () {
    this.camera = this.app.root.findByName('Camera');
    this.player = this.camera.findByName('Player');
};

// update code called every frame
LookAtCamera.prototype.update = function (dt) {
    if (this.app.xr.active) {
        // this.entity.lookAt(this.app.xr.camera.getPosition(), pc.Vec3.ZERO);
        this.entity.lookAt(this.player.getPosition(), pc.Vec3.ZERO);
    } else {
        this.entity.lookAt(this.camera.getPosition(), pc.Vec3.ZERO);//, pc.Vec3.ZERO);
    }
};

This works fine in web mode, but when I enter VR mode, all the objects don’t look at the camera. They behave weirdly, when I move the controller, the rotate. How can I fix this issue in VR.
Thanks,
Mahesh
P.S: Can I have a common line for both web and VR, where they always look at the camera irrespective of the mode.

Just to check, in VR you are looking at the Player Entity? Why not the Camera entity?

Both are just the same entity, player is the child of camera. Since lookAt(this.camera.getPosition()) is not working properly in VR, we replaced it with player entity, which is also not working properly.

Can you provide an small example project for people to investigate please?