It seems that on some recent Discourse versions, disabling Twitter/X oneboxes does not work well.
Also, this theme component does not work correctly on already existing oneboxes.
I have added some functionality that, in addition to replacing the bare links with a native embed, also looks for Twitter oneboxes, and then does the same thing.
That means there is no need to disable oneboxing or rebuild old posts any more.