Ok, I saw a notification from a helpful post that apparently has been removed in the meanwhile.
The suggestion did not work but it did contain a clue that helped me resolve this.
Adding the following snippet below the non-working code consistently resolved the issues I was having. I have tested this on multiple independent forums, both on stable and on tests-passed. I think this should be reclassified as Contribute > Bug …
<script type="text/discourse-plugin" version="0.1">
const userModel = api.container.lookup("model:user");
</script>
@Johani thank you for your help!