I would be surprised if the 40W was not enough to cut through it. You might have to use a slightly slower speed.
I can cut through 1/4" MDF with the 60W (at 8% speed mind you).
The good news is that it cost less than $5 to try it out. The material is pretty cheap.
Also note that what I’m buying at my home depot might be different than what you are buying. You need to research if it’s safe for you and your machine.
I have not done much research on it, because my local maker-space says “yep, that’s safe to use in our machines”. I took their word for it. I may research more what’s in MDF or hardboard before I actually use it in my Glowforge.
Home Depot MDF contains formaldehyde so make sure you don’t have any leaks in your vent hose and leaving in the GF for a little extra time wouldn’t hurt to really make sure it is aired out.
I’m not sure you will want to cut MDF if you are using a the air filter when it comes out due to how quickly i hear it clogs them up. Some maker spaces don’t allow it due to that reason, but venting out the window should be ok.
Good to know for the formaldehyde. My venting is not sufficient currently, I got some smoke coming into the room, so I’m backing off from using that MDF for now.