How do I stop the cloth modifier from treating a joined mesh as separate meshes?
Yes, there is a way to make it act as a single mesh. The way to do it is to add appropriate vertices to vertical and horizontal bars in edit mode and join them.