line trace not working when running project in headless mode using -nullrhi flag

I have a project set up where I am running rl agents down a track and i am using line trace to dynamically place spline points as the maps are loaded into the game during runtime. when i do this normally by just hitting play everything works as expected ,but unfortunately when i run the game in headless mode using the -nullrhi flag the line trace seems to be not detecting the boundaries of the road which are essentially invisible static meshes and i know the collisions for these meshes are working because when the agent passes over them it prints a statement that the agent passed said boundary. So is there a reason this line trace might not be working during headless mode?