Accurate calibration of the beam phase (i.e., the phase of the beam arrival relative to the cavity accelerating field) is essential for maintaining the stability and efficiency of linear accelerators. Conventional offline phase-scan methods, such as the \(\Delta T\) phase scan and phase-scan signature matching, are typically performed during commissioning or maintenance, requiring the accelerator to be taken out of normal operation. Moreover, these methods cannot effectively track the gradual drifts caused by ambient conditions. An online beam phase calibration technique using beam-induced radio-frequency (RF) transients was initially developed at DESY for superconducting cavities operating under open-loop conditions. Extending the DESY method to normal-conducting cavities at the European Spallation Source (ESS) introduces challenges. When the beam pulse length approaches the cavity time constant \(\tau = 1/\omega _{0.5}\) , where \(\omega _{0.5}\) is the cavity half bandwidth, the detuning effects distort the trajectory of the beam-induced RF transient and degrade the beam phase measurement accuracy. Furthermore, open-loop operation is generally not advisable for high-current proton linacs because of stability and safety concerns associated with the operation. To address these issues, we revisited the cavity differential equations and proposed a detuning compensation method that corrects the distorted trajectory in the in-phase/quadrature plane of the laser beam. In addition, by analyzing the initial 1.4 \(\mu\) s transient response before low-level RF (LLRF) feedback becomes active, beam phase calibration can be achieved under closed-loop operation. The experimental results indicate that the proposed method agrees well with beam position monitor (BPM)-based measurements. This approach enables real-time beam phase monitoring without interrupting the closed-loop operation and can be adapted to similar accelerator systems.