I have the same issue - the dedicated server crashes when trying to connect to it.
I found that the problem is due to the garbage collector (GC) in version 5.4, which now marks all objects that are “Disregard to GC” (loaded during the PreInit state of the engine initialization) as “reachable”. These objects are added to the root set, but if it is a BP-generated class, it will not be. Consequently, the GC interprets these objects as unreachable, even though they are still “Disregard to GC” and thus not managed by the GC (at least their reachability flags are not getting updated). This leads to an assertion failure.
I have several BP assets that are loaded in the class constructor through ConstructorHelpers::FClassFinder, and these objects were causing the crash for me. I was able to fix it by enabling the usage of “Disregard to GC” on the dedicated server in the *Engine.ini file:
[/Script/Engine.GarbageCollectionSettings]
gc.UseDisregardForGCOnDedicatedServers=True