I have not kept either fish but would guess that a larger tank would provide them both with places to call home to avoid negative interactions. I don't believe these fishes tend to be aggressive towards tank mates, rather they both are social animals that will likely compete for your attention, swimming and finning when you are near the tank and hoping for treats or other interactions.
I made a similar post about the engineer goby yesterday, and was distroyed and humiliated when others folks who have kept these fishes reported that theirs did eat small fishes, (a thing mine didn't do.)
Lets see what other folks respond with?
I don't think they care, that's unless they are getting in way of food. Cowfish/boxfish can be challenging to keep long term because they do eat alot compared to the size of their mouths, and aggressive eaters in the same tank can make that difficult. Just something to think about.