Flat roofs and platform sinking are two common installation configurations for high-speed pantographs. The cavity formed by the platform sinking is a potential source of aerodynamic drag and noise. In this paper, the shape of the rectangular cavity is optimized, and the aerodynamic performance of the high-speed pantograph with or without platform sinking is compared and discussed based on the optimized cavity results. The flow field and sound propagation are predicted by the improved delayed detached eddy simulation (IDDES) method and the FW-H equation. The results show that the rectangular cavity produces the largest aerodynamic drag and radiation noise. The upstream, downstream, and bottom surfaces of the cavity can be optimized by rounded and sloped edges to reduce aerodynamic drag and noise. The unstable shear flow and recirculation zone formed by flow separation and reattachment can be reduced by modifying the upstream and downstream surfaces of the cavity. In addition, the vortex in front of the downstream surface of the cavity can be reduced or even eliminated by modifying the bottom surface. When the upstream and downstream surfaces of the cavity are rounded and the bottom surface is sloped (R/H = 0.8), the aerodynamic performance of the cavity is better. Compared with the pantograph installed on the flat roof, the aerodynamic drag and noise of the pantograph with platform sinking are significantly reduced due to the shielding of the lower structure by the cavity, and the total drag and noise are reduced by 5.22% and 1.45 dBA, respectively.