So I found this temporary fix by Vijay Padhariya:
https://www.ads-software.com/support/topic/issue-with-transient-in-wp-4-and-wp-seo-163?replies=5
I’ve tested it and have been checking my XML sitemaps for the past 5 days and it seems to have worked.
Just as he says, you have to remember to apply the fix every time you update the SEO Yoast plugin.
I just wish the guys over at Yoast would release a fix for this already instead of us having to always make a change to their PHP file.