nvmlDeviceGetEncoderSessions always return 0 active ssessions

I’ve been trying to use the nvmlDeviceGetEncoderSessions() function to retrieve some statistics of the encoder sessions I have, after opening encoder sessions using the ffmpeg function ff_nvenc_encode_init() (which calls NvEncOpenEncodeSessionEx() and NvEncInitializeEncoder()).
I’ve opened a few encoder sessions, but still get that there are 0 active sessions - both when using nvmlDeviceGetEncoderSessions() and using nvidia-smi.
Does someone have any idea of what am I doing wrong?
Found this (Nvidia-SMI, encoder.stats.sessionCount always reporting 0) question about the same issue from a few months ago and I wondered if perhaps there’s a bug in the encoder sessions function and it always returns 0 - but the other question was left unanswered, so I still don’t know if that’s a bug or something we’ve both done wrong.
Would be really glad to get some help with that!
Thanks in advance! :)