You cant’t mount most motors straight to 15mm square tube, as not all of the screw holes will fit on the tube. You would need to either use a larger stock, or use some sort of mount.
Even with 25mm square tube there is trouble as how do you tighten the screws?
Most of the time it is best to use all for screw holes to a mounting plate and then mount the motor mount to the arms.
Aside from strength, mounting screws going into the motor need to be short and directly bear against solid metal for the mounting surface as opposed to the hollow tube.
The hollow tube can flex and allow the longer screws to be screwed in far enough to cut into the motor windings.
You can use short screws and relieve one side of the tube to clear the head and secure it only through one side, but the metal is thin and aluminum is flexible and will not make a good long term solution.