Dynamics of energetic particle driven modes and MHD modes in wall-stabilized high-β plasmas on JT-60U and DIII-D