As you have not supplied your implementation, it is hard to pinpoint the coupling issue. I suspect that you are using assemble_system.
See: How to implement the equivalence of `assemble_system` in DOLFINx - #2 by dokken
for an explaination of why the diagonal dofs in legacy dolfin is not equal to one.