How to package the game with Server Target setting?

I am also having the same issue.
I tried doing this step: “In TurnkeySupportModule.cpp at row 479 i added this following:
BuildCookRunParams += TEXT(” -dedicatedserver");"
But to no avail even after recompiling the engine. Does it require a full rebuild of the engine?