I notice there is a strange box-shaped icon in the toolbar in the AUCTeX mode (circled in the picture below).
It should be a toolbar separator (for example, on Linux):
I am using GNU Emacs 26.1 with AUCTeX 12.1.1 on macOS 10.13.6. This problem seems to have existed for many years. The exact same problem was reported in 2011. Does anyone know what causes this problem and how to fix it?