Have you tried connecting the namespaces with a hidden vertical line?
The following seems to do the trick:
@startuml
namespace ns1 {
}
namespace ns2 {
}
ns1 -[hidden]- ns2
@enduml
-- Alan G.
PS - sorry about the line spacing - it looks fine in the comment editor, but it's all over the place when I save it :(