GlobalShaderCache-PC3D_SM5.bin is missing

The global shader cache file
‘G:/ProgramFiles/…/Engine/GlobalShaderCache=PCD3D_SM5.bin’ is

You’re running a version of the application bluilt to load COOKED content only,
however no COOKED content was found. Consider cooking content for this build,
or build and run the UNCOOKED version of the application instead.

I get this error when trying to run my standalone game. I’ve tried ‘Cook Content for Windows’ in the editor, and it succeeds, but I still get the error. I found similar threads from 5 years ago in this forum, but they don’t have any clear answers. What causes this error?