I have gotten longer thread length in square tubing by using T-nuts.
I cut the prongs off the T-nut, drill a big enough hole in the tubing to insert the T-nut(upside down?), and then tack weld the flange covering the hole.
That way the extra thread length is inside the tube.
*Knowing the thread size you need would be helpful in offering different fixes. (not just "larger than 1/2")
Here's some 1/2x13 SS T-nuts, pricey though, you might find others that are cheaper:
Are you able to slide a threaded plate into the tube to position the threads?
If so, you could drill a smaller hole (2) either side of the hole where you need the threads, slide the threaded plate into position/inside the tube, and button weld thru the smaller holes to the threaded plate to anchor it in place/position.
.