Due to a problem in the Intel® Quartus® Prime Pro Edition Software version 20.4 and earlier, the CDR can't lock in 25G mode when using the E-Tile Hard IP for Ethernet when the PHY reference frequency is set to 312.5MHz.
This problem has no workaround, as the 312.5MHz is not in the supported range for the E-Tile PHY IP. So instead, use a reference clock frequency of 156.25MHz or 322.265625MHz.
This 312.5MHz reference clock frequency option is fixed in Intel® Quartus® Prime Pro Edition Software version 21.1.