Ray Traced Shadows With World Position Offset on Instanced Static Mesh or Foliage

Ok, I found out what was wrong, at least in my case. Command (…).EvaluateWPO works fine, shadows are shifted because the environment level was on a sub-level which was offset in Level Options. After I zeroed sub-levels offset, raytraced shadows of objects that evaluate WPO offset jumped back to the proper place. It seems like a bug to me, I think that evaluating WP) should include sub-level offset.

About evaluating WPO in general, there are checkboxes, both in static mesh components and in foliage.

In the case of the static mesh component, all you need to do is just check the Evaluate World Position Offset checkbox.
1637922965_HuNCLJGlBz

In the case of foliage, you need to change editor mode to Foliage, select all foliage instances and look for Evaluate World Position Offset checkbox and check it.