-How to recover such DDL lock problems operation without recreating the database? In other words, what is the proper way to cleanly restart both nodes?
Restarting both nodes should be sufficient, and I am surprised to see that is not the case here. This needs more investigation.
-Is it a well known method to properly detach and attach nodes?
I'm not sure I understand.
If you mean join and remove nodes, join with bdr.bdr_group_join, remove with bdr.bdr_part_by_node_names .