Yes, there is a button directly in the first section of the learning path creation, which allows assigning the learning path as a mandatory learning path. Existing mandatory learning paths can also be changed to normal learning paths that way.
When switching from a normal learning path to a mandatory learning path (or vice versa), the learning level is maintained.