The latest security update of git, on at least Ubuntu 22.04 LTS (jammy), is buggy and breaks both gitk and git gui, And it seems the same bug affects Ubuntu 18.04.
The bug on Ubuntu launchpad: https://bugs.launchpad.net/ubuntu/+source/git/+bug/2116253
Git vulnerabilities that are fixed in the (partially broken) security update: https://ubuntu.com/security/notices/USN-7626-1
Since it's a security vulnerability it may not be wise to revert to an older version, unless you only use the affected commands on trusted repositories.