You select the pages in the pages panel and apply a new page format and then try to have the content adjusted with “Adjust Layout“. But there is nothing to adjust because in the second step in your recording the page size does not change.
Without selecting any pages and resizing them go directly to the “Adjust Layout“ options, which should give you the result you are looking for. You don’t need to select any elements on the page. Before making adjustments make sure that your master page has the same format as your layout pages. Otherwise there might be unusual or no changes to your content.