There's something called a "carnet" for that case.[1] When something is leaving the country temporarily but coming back, there's a way to register that.
This comes up a lot if you're doing trade shows or performances.
At work, when we send stuff From USA to Canada for repair, we just need to put the correct Canadian customs code and "For warranty repair" on the packing slip.