Inclusion Criteria:  Histologically confirmed unresectable locally advanced, recurrent or metastatic HER2-positive gastroesophageal adenocarcinoma (adenocarcinomas of the stomach or esophagus, including the gastroesophageal junction), defined as 3+ HER2 expression by IHC or 2+ HER2 expression by IHC with ISH positivity per central assessment. Subjects with esophageal adenocarcinoma must not be eligible for combined chemoradiotherapy at the time of enrollment Assessable (measurable or non-measurable) disease as defined by RECIST 1.1 Eastern Cooperative Oncology Group (ECOG) performance status score of 0 or 1, assessed within 3 days prior to randomization Adequate organ function Left ventricular ejection fraction (LVEF) ≥ 50% as determined by either echocardiogram or multiple gated acquisition scan (MUGA)  Exclusion Criteria:  Prior treatment with a HER2-targeted agent, with the exception of subjects who received HER2-targeted treatment for breast cancer > 5 years prior to initial diagnosis of GEA Prior treatment with an anti-PD-1, anti-PD-L1, anti-PD-L2 or any other antibody or drug specifically targeting T-cell co-stimulation or checkpoint pathways Prior treatment with systemic antineoplastic therapy for unresectable locally advanced, recurrent or metastatic GEA Untreated central nervous system (CNS) metastases, symptomatic CNS metastases, or radiation treatment for CNS metastases within 4 weeks prior to randomization. Stable, treated brain metastases are allowed (defined as subjects who are off steroids and anticonvulsants and are neurologically stable with no evidence of radiographic progression for at least 4 weeks prior to randomization) Known history of or ongoing leptomeningeal disease (LMD) Known additional malignancy that is not considered cured or that has required treatment within the past 3 years Known active hepatitis Any history of human immunodeficiency virus (HIV) infection Known SARS-CoV-2 infection; subjects with prior infection that has resolved per local institutions' requirements and screening guidance are eligible QTc Fridericia (QTcF) > 470 ms Clinically significant cardiac disease, such as ventricular arrhythmia requiring therapy, uncontrolled hypertension or any history of symptomatic congestive heart failure (CHF)