I reproduced this problem on my Windows 11 computer with the latest weekly build from @wpferguson. I opened a raw file and adjusted the curve in RGB curve. I then compressed the history stack and my RGB curve adjustment disappeared. There definitely seems to be a bug here.
Not able to reproduce on Linux / Ubuntu 22.04, darktable 4.5.0+1394~g269e57434d.
It may help if you give detailed step-by-step instructions on how to reproduce the issue, and/or if you can share an affected raw image with corresponding sidecar file (xmp).