As a 140kg, 1.8m tall (79.5cm inseam), I will be mostly riding roads until I lose some weight, but I was thinking which wheels do you think would be better given my situation, given I want a mountain bike? Would the 29" be better since I will be mostly ride roads (at least at the start, until I lose weight and maybe try some off-road)?
In theory, a smaller wheel is stronger than a bigger wheel if hub and rim section are the same.
This is largely due to the length of the spoke and it's contributions to the stiffness/flex vs spoke braking force.
Whether the difference between a 27.5 wheel and a 29 wheel is in of itself enough to mean a real world differe, I don't think so.
I think a strongly made (ie specially made for heavier rider) 29er wheel, will be stronger than a generic OEM (for the masses) 27.5 wheel.
I would strongly suggest you pick the bike you will enjoy riding more, and replace the wheels with a stronger wheelset when you need to.
This is exactly what my friend (125kg) did, he bought a bike, and I built him a stronger rear wheel with a Hope Pro 4 hub, DT Swiss eBike specific spokes (brass nipples) and a downhill rim. It was heavy, it will outlast his bike frame...