The problem here was the name of the parameter passed to the confirmPayment function. It should have looked like the below:
const {error} = await stripe.confirmPayment({
elements: expressElements,
clientSecret,
confirmParams: {
return_url: window.location.href,
},
redirect: 'if_required',
});