MacBook Pro's Lids closing with turn off system
On my MacBook Pro (Ventura 13.2.1) , I activated the "Prevent computer from sleeping automatically when the display is off while charging" setting and then couldn't disable it.
I used the sudo pmset -a disablesleep 1 code in Terminal and then wrote sudo pmset -a disablesleep 0 to return to the default setting. And I was able to turn off that setting in the Display preferences.
Before these changes, when I closed and reopened the MacBook Pro's display, it made a "ding" sound, as if the MacBook was shutting down and reopening. However, now when I close and reopen the display, everything comes back as if it's not going into sleep mode.
What should I do? Can you please help me?
MacBook Pro (M2 Max, 2023)