Veracrypt GLib Error

I have veracrypt installed from the 23.11 channel and if I try to run it in CLI mode it always immediately crashes with this error:

sudo veracrypt -t MyVeracryptImage /tmp/veracrypt_mnt1

(process:21037): GLib-GObject-CRITICAL **: 01:10:16.837: g_object_get: assertion 'G_IS_OBJECT (object)' failed
munmap_chunk(): invalid pointer
[1]    21035 IOT instruction  sudo veracrypt -t MyVeracryptImage /tmp/veracrypt_mnt1

It doesn’t happen if I run veracrypt in graphical mode (without the -t option). I’m pretty new to nix so I am not sure how to diagnose the issue.

The only other place I could find mentioning an issue like this one is here: FS#80184 : [veracrypt] g_object_get: assertion 'G_IS_OBJECT (object)' failed

The version of veracrypt I’m using (via the unstable channel) is 1.25.9

Appears to be related to the underlying version of wxWidgets, connected with this Github issue:

Discovered this is a broader issue with wxGTK apps in general and is already addressed by this NixOS issue: