I just bumped into this issue myself. tl;dr good news: it's already fixed few months ago in official git source codes. Bad news: latest version of Mozc available for Ubuntu 21.04 in it's repositories is 2.26.4220.100+dfsg-4ubuntu3
with the version that contain the fix is 2.26.4472.100, so straight sudo apt update && sudo apt upgrade
does not help.
I'm trying to dig into official docs for building Mozc in Docker environment, but my knowledge of Ubuntu is lacking to replace present Mozc system with the new one, and I can't find proper guidelines for it in official docs, neither in other answers that mostly address Mozc installation for older versions of Ubuntu from official apt repository.
I would appreciate a lot if anybody could give a bit more detailed steps for building and replacement this system from github sources, without waiting for official repository.