British citizens will not need to leave Germany if their country leaves the European Union without an exit deal, an interior ministry spokesman said.