Once you passed CBP preclear checkpoint you are deemed to be "on US soil". Departing that area of the airport requires CBSA to admit you back to Canada.
If you have a passport that can get you into Canada you are OK with that part of the equation.
I remember seeing someone who left US passport at hotel and was granted admission without the backroom routine at YYZ before 2001.