Error in Computer Shader "Accessing the RHI resource at this time is not allowed" (5.4.2)

Perhaps you should somehow push this to a buffer first and then assigned in the loop

I’ve noticed that the engine has
FRDGBufferSRVRef
FRDGBufferSRV

This might not cause direct access errors.