The mortgage does not care whether the person making the payment is a man or a woman. The lender cares whether the money arrives on time.
That makes the question of who should pay the mortgage less about gender and more about how a household handles income, ownership, debt, and risk. One partner might earn more. One might handle childcare. One might bring a larger down payment. Sometimes one person earns the paycheck while the other keeps the household running like an air-traffic control tower.