UE4 23 TargetType.server / dedicated server - missing module from solution

I’m trying to create a simple dedicated server build, with different modules for server and client.
I’ve created 2 new modules, added them in the .uproject file, and in their .Target.cs file I set their target types to be TargetType.Server and TargetType.client.

However, when generating the project files the modules are missing - only the base game module is there. if I change the target type to TargetType.Game, the modules exist, hence I’m sure that is the problem.

How do I fix this? what am I missing?