I found out the issue. The problem is with this flag in Target.cs
if (Configuration == UnrealTargetConfiguration.Shipping) { bUseChecksInShipping = true; }
I tried to create a simple ThirdPerson project, add a C++ class to get the Build and Target files. Add bUseChecksInShipping = true; and build it in shipping mode, it’s crashing with the same error as above:
LogWindows: Error: appError called: Assertion failed: GraphicsContext [File:G:\5.1.1\Engine\Source\Runtime\RHI\Public\RHICommandList.h] [Line: 581]
There is no active graphics context on this command list. There may be a missing call to SwitchPipeline().
This was not happening in 4.27.2, the flag bUseChecksInShipping could be used in shipping builds without any problem.
UPDATE: I found out that’s an already logged ticket as well: Unreal Engine Issues and Bug Tracker (UE-171275)