It looks like some packages are missing dependencies of Unity modules, the ones I found are:
Unity Physics - Doesn't depend on com.unity.modules.physics
Entities - Doesn't depend on com.unity.modules.uielements
I created an issue for the first one: IN-42278
It would also be great if this is fixed in a way that makes the built in physics an optional dependency, I don't use it at all (I use the custom authoring) so I would like to remove it from my project.