The adjustment is automatic, but can be limited (by the software).
If you use only one of the boxes, the text in the header or footer will be aligned to the closest margin (or to the center on the page if your choice is the middle box), and can fill the full width of the print ares on the page.
If you place text in more than one of the three boxes, the width adjustment will be more limited, and you will get the behaviour you describe.
The header text in the left box flowed over the middle box and onto the right box while being entered.
On exiting the header space, the content presence in the right box caused the text to be truncated after "flowing."
Inserting a return before flowing forced the rest of the line into the second row seen here.
With no entry in the right box, and the return before 'flowing' removed, the text was free to flow through the center box and into the right box.
Regards,
Barry