Have you tried this?
https://forum.cfx.re/t/solution-forcing-fivem-redm-to-use-your-discrete-gpu-infinite-loading-fix/217731/93