How close to weather? If directly into it you're better off dropping the main and jib.
If tacking into weather it will depend upon conditions. A reefed main will allow you to have a steadier motion in rough seas. In light airs keep up all your canvas. Heel it as much as you are comfortable with. The motor won't care if the boat is heeled unless it's a carbureator fuel system. Fuel injection would work inverted.
No expert myself, though. I don't do motor sailing as a rule. If there is enough wind to sail I do. If not, I fish or motor.
That's not entirely true. While fuel injection would work, a diesel at a high angle of heel with a sump would likely circulate its oil unevenly, and would, unless using a universal coupler, likely start to wear the transmission and the shaft as it went out of alignment as the weight of the engine unequally compressed the motor mounts.
In a survival situation, this isn't an issue, but running the engine while heeled isn't, to my knowledge, a great recipe for longevity.
This is why I mostly sail, or motorsail in light air, or motor directly into the weather if I have to go in that direction. The fore and aft motion is easier on the tranny than going from 40 degrees port to 40 degrees starboard.
If you are motor sailing to weather as a storm tactic the main should be reefed just as it is when you are sailing in high winds. If you are motor sailing to get to your destination more quickly keep the rpm and sail combination that will get you the closest to your hull speed.
Most of us rarely read the manual that came with our engine, but there will be a specified amount of heal that your engine will tolerate listed. That amount of heel should not be exceeded for a prolonged amount of time.