First, do not use a text box for your text on the page you want to print sideways.
Look at what Doug and Suzanne have told you.
To clarify a bit, the landscape page will display as shown in your first picture but will print (except the page number) like your second. Since it is a separate section, you can manage the page number separately. See
How to put a portrait page number on a landscape page by Bill Coan, Suzanne Barnhill, and Dave Rado MVPs. Here is a sample document demonstrating this method:
Portrait Headers and Footers in Landscape Section Demonstration. I updated this in December 2020 to include the possibility of using Frames instead of Textboxes.
Alternatively, if you want your document on your Word screen to look like your second picture, you would not change to landscape but rather leave your text in portrait mode. Set your table to look like your landscape page tipped on its side and rotate the
text in the table.