I had the same problem with 4070ti in UE4.27 and UE5.1. Then I created a new project and enabled raytracing when setting the project defaults, and it worked.