RHI AllocatedMemorySize not updating

I’m trying to display the used and total VRAM in the Graphics Settings, but I’m having trouble with AllocatedMemorySize. It’s not updating ingame even if I change and apply graphics settings. Is there a step needed to make it update?

This is my function to get the current VRAM values:

265632-vram.png