Material function if statement not working. If based on is Play value. Help

Looks like MPC breaks the material if its connected to if or lerp alpha node for some reason… Do you have any ideas how do i do it in some other way? How do i apply occlusion only while play mode is active?