The shortcode apparently doesn’t always render when using hugo in server mode. When I do a full build, it is fine.
But the suggested fix in the linked issue (use .Content before accessing the .Scratch created by running content) don’t apply, as I was doing so already.