Periodic Boundary Condition (PBC) along both the x and y directions

You will have an issue with constraining the same degree of freedom twice at the corners of the mesh. How to deal with this has for instance been shown in Periodic BC in dolfinx - #8 by welahi