For ID3 tags (which are used with MP3 files), the recording id is saved in the UFID frame (see http://id3.org/id3v2.4.0-frames, scroll down to “4.1. Unique file identifier”), which might be treated different from other tags by software you mentioned. See also the tag mapping docs.
I assume VLC has some special handling here, since if you inspect the Metadata property of the MPRIS player interface exported by VLC on DBUS (this isn’t possible on Windows, I think), an “mb:trackId” with the recording id is included: