It does not matter if you uninstall groups app, you removed the sources with the
apt remove egroupware-epl-\*.
Groups app has not database tables, so no data ist lost.
Unfortunately you wont be able to edit or create new groups.
But the old groups app, also does not work with PHP 8.1. If you can wait for the release of 23.1 beginning of next year, it will include the groups again in the stock community edition.