Thank you for your help, it looks like the pages that I was having trouble with were quite heavy with fields using a page builder, so it wasn’t saving the Rank Math details. I removed a couple of rows of the page builder and it started saving as expected. Very weird!
I don’t have any caching plugins running yet as it’s still in a staging area. But in trying the Health plugin, it turns out it’s got something to do with the theme, or some fields in the theme as it doesn’t have this issue on every page.