I think you got the slider working fine, but I am sure there's some conflicting code that resets it back (maybe when you straight alt-f4, maybe when you go to a different room etc. or the x position of the slider changes back because the player's got a different resolution on the monitor - you gotta think outside the box - there's tons of stuff players can do which will always reveal some 'bugs', hence it's great you release it now and people can report if they encounter it and how they did.
If you really find coding the slider hard then you can just make a small change to it, instead of being a slider (you can still draw it as a slider) make some big dots along the line like (O-O-O-O) each dot represents volume percentage (0-25%-50%-100%) just keep it simple like that, just a click of one dot and it changes the volume. Anyways sorry for the big walls of text, hopefully you can get something out of it 🥰 Keep up the good work!