You are better off with it at the back of the bike. Or just use the triangular tool box on the side of the bike.
It is NOT good to mount under the headlight, because it can block the cooling air to the engine, and it may get squeezed by the front fender at full compression of the front suspension.
I think the bottom line is that you had it in the best place. You might try to figure out a way to reduce the rubbing, or revert back to the original tool box.