Changes based on patch from DO-3271757-8 based on the work from users elgandoz and pasqualle.
https://www.drupal.org/project/toolbar_menu/issues/3271757
Initial changes based on the work from @elgandoz and @pasqualle:
https://www.drupal.org/project/toolbar_menu/issues/3271757#comment-15163405
to fix a CSS class name conflict with the Gin theme.