In conclusion, this study demonstrates the genetic and immune microenvironment characteristics according to trastuzumab‐based treatment and suggests potential biomarkers to predict PFS of patients with HER2‐positive GC. Here, ERBB2 is linked to gastric cancer.