This topic seems to be getting highly fractured. The OP stated that bans weren't saving, but then contradicted later on, saying that bans were fine but unbans weren't saving. Others have added variations (groups, custom groups, etc) that may or may not have anything to do with the OP.
FWIW, I can confirm that I run multiple custom groups and have no issue with ban, unban or group membership persistence. This is with the latest repo version of everything. (ULX, ULib, etc). I realize that doesn't magically fix everything for everyone -- but I do want to put it out there that it does work as expected, at least under some environments.
To clarify, the /data/ulx/bans.txt file is simply a history of ban activity that contains a bit more metadata than the stock banned_user.cfg file -- it doesn't directly affect ban status for individuals. That status comes from /cfg/banned_user.cfg. If ban or unban status is not "sticking" between map changes or restarts then I would suggest that a "wriiteid" con command is not being issued after the adjustment. "writeid" flushes the in-memory ban list to banned_user.cfg. Any time I've had problems with bans not persisting, it's because I was using a mechanism (some other addon, code of my own, etc) that was creating the ban/unban but then NOT issuing a "writeid".
HTH