Your problem lies in your analysis of the irreversible expansion.
In the case of both a reversible expansion and an irreversible expansion, the gas pressure at the interface with the piston matches the externally applied pressure during the deformation. However, in the irreversible expansion, the gas within the cylinder is not uniform with respect to pressure or with respect to temperature.
So the interface pressure (which determines the amount of work done) does not match the average pressure of the gas within the cylinder. In addition, the pressure at the interface depends not only on the gas volume but also on the rate at which the gas volume is changing. So for an irreversible process, we have very little control over what is happening inside the cylinder.
The only thing we can control is the pressure at the interface $p_{ext}$ where the work is being done. We do this by whatever means necessary, including feedback control systems. In the typical scenario, we drop the pressure at the interface to a constant value, less than the initial pressure in the cylinder, and then hold it at that value until the gas volume has increased to the point where the gas in the cylinder is again at equilibrium. At this point, the gas pressure throughout the cylinder is described by the ideal gas law again.
If we follow this game plan for the irreversible process, even if the final pressure matches the value be obtain in the reversible process, the final temperatures and the final volumes will not match.
If you would like me to provide a detailed analysis of the irreversible case, illustrating in detail what transpires, I will be glad to do so. But right now, I'll give you a chance to ask some questions.
Irreversible and Reversible Expansions
Initial conditions: $T_i, P_i, V_i$
Irreversible expansion:
$$\Delta U=-\int_{V_i}^{V_f}{P_{ext}dV}$$
In the irreversible expansion we are considering, $P_{ext}$ is controlled to be constant at the final pressure $P_f$ with $P_f<P_i$. The expansion is allowed to continue until the gas re-equilibrates at the final pressure and volume. Therefore, we have:
$$nC_v(T_f-T_i)=-P_f(V_f-V_i)\tag{1}$$
As noted in my discussion above, the ideal gas law cannot be applied to the intermediate states during the irreversible expansion, but it can be applied to the two equilibrium end states. Therefore, $$V_f=\frac{nRT_f}{P_f} \tag{2}$$
and
$$V_i=\frac{nRT_i}{P_i}\tag{3}$$If we combine equation $(1)$, $(2)$ and $(3)$, we obtain:$$C_v(T_f-T_i)=-R\left(T_f-\frac{P_f}{P_i}T_i\right)\tag{4}$$
We can solve this equation for $T_f/T_i$ and a function of $P_f/P_i$ to obtain:
$$\frac{T_f}{T_i}=\frac{1+(\gamma-1)(P_f/P_i)}{\gamma}\tag{5}$$
Note that this equation differs from the relationship one obtains if the expansion is carried out reversibly.
Reversible expansion:
For a reversible expansion, we have $$dU=nC_vdT=-PdV=-\frac{nRT}{V}dV$$ or $$C_vd\ln T=-Rd\ln V=-R(d\ln T-d\ln P)$$This integrates to:
$$\frac{T_f}{T_i}=\left(\frac{P_f}{P_i}\right)^{\frac{(\gamma-1)}{\gamma}}\tag{6}$$
Note from equations 5 and 6, that if the temperature ratios are the same in both cases (equal work), the pressure ratios are not, and if the pressure ratios are the same in both cases, then the temperature ratios are not (unequal work).