DBCs on submesh - unexpected dof indices?

This has some very strong assumption on the doflayout and ordering of vertices, which I am not sure is generally true (for anything that is not P1 or in parallel).

Since your example is P1, where one indeed can find a relation between the dofs and vertices, I would have a look at: Moving submesh diverges from its designated trajectory in a two-phase problem - #2 by dokken
as I try my best to explain how to map data from parent to sub-mesh, through geometry, topology and dof indices.