When upgrading a module FOO that has _new_ dependencies on module BAR, dnf should mark the module BAR as installed. There was some talk of this happening by having the depsolver mark rpms from module BAR to be installed, and then working back from that to mark BAR as an install (due to the rpms being installed from it). However I'm not sure this is enough for el8 (Eg. compat. repos.)
The DNF team will look into this issue probably after mid-May where initial modularity enablements in libdnf are finished. We'll need a proper dependency resolution to fully support this feature.
Module BAR will be enabled. Fixed in https://github.com/rpm-software-management/dnf/pull/1144