Yes, you can change this behavior, but you will probably not want the side effects this causes.
The key to limiting the cell contents to the cell's boundaries regardless of whether the adjacent cell contains data is the text alignment
Fill. Select the cells you don't want to overflow and right click them > Format cells... > Alignment tab > Horizontal alignment > Fill
The problem with this method is that this will actually fill cells by repeating their content when it is short enough to fit in the cell multiple times. See below screenshot for what this means. (Note that
B7 is filled with 'short text'.)
In addition to this, numbers will become left aligned and if the adjacent cell is set to
Fill, too, text will still overflow into that cell (thanks posfan12 and HongboZhu for pointing this out).
So it really seems like you will be stuck with the workarounds in Benedikt's post.
Recommendation: You could fill the adjacent cells with tick characters (
') using Benedikt's first, very clever method. This way you don't have to hide anything, prevent cell overflow and if you copy the cells as text (let's say to notepad) you still get empty text and not spaces, ticks, or any other filler characters for these cells.