Main Inclusion Criteria:  Male or female, age ≥18 years at the time of signing first informed consent;  Patient with histologically-confirmed, unresectable locally advanced or metastatic cancer with the following restriction:  Single arm part: patient with solid tumours of any origin (excluding gastric tumours and adenocarcinomas of the gastroesophageal junction) who has progressed on standard therapy or for whom no standard therapy exists; Randomized part: patient with breast cancer who had either progression during or after at least two human epidermal growth factor receptor 2 (HER2)-targeting treatment regimens for locally advanced or metastatic disease, or progression during or after [ado-]trastuzumab emtansine treatment for locally advanced or metastatic disease;  HER2 tumour status as determined by a local laboratory using immunohistochemistry (IHC) and/or in situ hybridization (ISH):  Single arm part: at least IHC 1+; Randomized part: IHC 3+ and/or ISH positive;  Eastern Cooperative Oncology Group (ECOG) performance status ≤ 1; Patient should refrain from wearing any kind of contact lenses during trial treatment; Adequate organ function  Main Exclusion Criteria:  Current or previous use of prohibited medication as listed in the protocol History of infusion-related reactions and/or hypersensitivity to trastuzumab containing treatment or excipients of the trial treatments which led to permanent discontinuation of the treatment; History or presence of keratitis; Left ventricular ejection fraction (LVEF) < 50%, or a history of clinically significant decrease in LVEF during previous trastuzumab containing treatment leading to permanent discontinuation of treatment; History or presence of idiopathic pulmonary fibrosis, organizing pneumonia (e.g. bronchiolitis obliterans), drug-induced or idiopathic pneumonitis, or evidence of active pneumonitis on screening chest CT scan; History or presence of clinically significant cardiovascular disease; Severe, uncontrolled systemic disease; Symptomatic brain metastases, brain metastases requiring steroids to manage symptoms, or treatment for brain metastases within 8 weeks.