Update: The transient is simply not saving. It is saving when I json_encode() it.
Also, I am unable to reproduce this on another Wordpress instance, so I’m moving this to support because I believe this is a Wordpress issue. I suspect there might be some kind of security plugin interfering.