Understanding and modeling wave attenuation by flexible vegetation have emerged as essential issues in coastal and ocean engineering. Given that the existing XBeach phase-averaged wave model can only simulate wave attenuation by rigid vegetation, and previous studies of wave energy dissipation by vegetation are mainly restricted to linear wave theory. This study aims to extend the XBeach phase-averaged wave model to simulate wave attenuation by both homogeneous and heterogeneous submerged flexible vegetation, and determine wave attenuation simulation deviation based on different wave theories. Hence, the existing flexible vegetation dynamic model is incorporated into the XBeach phase-averaged wave model. The reliability of the coupled model in simulating wave attenuation by both homogeneous and heterogeneous submerged flexible vegetation is revealed. Simulation results also demonstrate that the computed wave attenuation rate based on Stokes second-order wave theory is larger than that based on linear wave theory within the parameters used in this investigation. Meanwhile, wave attenuation simulation deviation between these two wave theories enlarges as the Ursell number increases within the parameters used in this investigation. This study can broaden the application of the XBeach model and lay the technical foundation for future engineering practice of nature-based coastal defence.