I just tested this out by created a simple multiple page Word document. Tested on macOS 13.3.1 and Microsoft Word 365 version 16.72.
Using section/NextPage breaks to isolate the one page that needs to rotate to landscape. Verified other pages are in portrait and page 3 is landscape. Saved the Word document. Turned it into a PDF via File -> Print and clicking the PDF button at the bottom of the print dialog box. It worked fine. Then I tested exporting from Word via Save a Copy and changed the format to PDF and best for printing and that also worked.
The problem is not with Word nor macOS. It's something else like perhaps it doesn't like the content on your landscape page. Try creating a new document doing it the way I describe above. I just put "Page 1, 2, 3" on each page and used page breaks between portrait pages and only used section next page breaks before and after the one page I needed to rotate to landscape.
Other factors might be if you have Adobe Acrobat and are using that tool to perform the PDF generation.