No GPU is detected despite "gmx --version" detecting the GPU

GROMACS version: 2022.4
GROMACS modification: No
I am trying to run GROMACS and I am getting the following error:
“Cannot run short-ranged nonbonded interactions on a GPU because no GPU is detected”.

When looking up this error, in every single thread I have read, when the user gets this error and runs “gmx --version”, either there is no CUDA driver or no CUDA runtime detected. However, both are detected when I do which makes it pretty confusing. This is a screenshot:

Also, nvidia-smi outputs normally.
Here is a link with the screenshots of the error and output of nvidia-smi as well since I can only include one embedded media: Imgur: The magic of the Internet
Any help/guidance would be appreciated.

You are using CUDA version 12 which is not backward compatible with the driver installed which is 11.6 as your nvidia-smi output indicates. Either upgrade the GPU driver or build GROMACS with a CUDA 11.x version.

Thank you. This worked.