Displacement + volume working on viewport, not on render (glitch?)

As you can see, it also generates some weird effects in the lower part of the materials, but I can work with that. What I can’t understand is why does it work in the viewport but it doesn’t when I render it.
Also, if I make any changes to the values, the effect disappears on viewport view, so I have to disconnect and reconnect displacement nodes in order to make it work again. Is this a glitch?

Hello Naolito, welcome on board.)
First you have to tell which Blender version you are using and you have to share the Displacement settings.
I could imagine you have forget to switch under
Material Properties --> Settings --> Displacement --> Bump
to Bump+Displacement or only Displacement

Hi! Thanks for your help. It’s solved now! I just added a mapping node to it and started working, even if I disconnect again the node, it keeps working. Weird!