After clearing the cache my site crashed. The error logs linked the caused to
Error: Call to a member function hasPermission() on null in Drupal\groupmenu\GroupMenuConfigOverrides->getUserGroupMenuIdsByGroupTypes() (line 213 of /var/www/drupal/apphome/modules/contrib/groupmenu/src/GroupMenuConfigOverrides.php)
I'm not sure why this is an issue now as clearing the cache didn't affect it before. Commenting the if statement fixed the issue but I'm not sure what other issues may arise as a result. Here is the stackflow below.
Error: Call to a member function hasPermission() on null in Drupal\groupmenu\GroupMenuConfigOverrides->getUserGroupMenuIdsByGroupTypes() (line 213 of /var/www/drupal/apphome/modules/contrib/groupmenu/src/GroupMenuConfigOverrides.php) #0 /var/www/drupal/apphome/modules/contrib/groupmenu/src/GroupMenuConfigOverrides.php(111): Drupal\groupmenu\GroupMenuConfigOverrides->getUserGroupMenuIdsByGroupTypes(Array) #1 /var/www/drupal/apphome/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\groupmenu\GroupMenuConfigOverrides->loadOverrides(Array) #2 /var/www/drupal/apphome/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides(Array) #3 /var/www/drupal/apphome/core/lib/Drupal/Core/Config/ConfigFactory.php(136): Drupal\Core\Config\ConfigFactory->doLoadMultiple(Array) #4 /var/www/drupal/apphome/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(188): Drupal\Core\Config\ConfigFactory->loadMultiple(Array) #5 /var/www/drupal/apphome/core/lib/Drupal/Core/Entity/EntityStorageBase.php(292): Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(NULL) #6 /var/www/drupal/apphome/core/lib/Drupal/Core/Entity/EntityBase.php(541): Drupal\Core\Entity\EntityStorageBase->loadMultiple(NULL) #7 /var/www/drupal/apphome/modules/contrib/group/modules/gnode/src/Routing/GroupNodeRouteProvider.php(19): Drupal\Core\Entity\EntityBase::loadMultiple() #8 [internal function]: Drupal\gnode\Routing\GroupNodeRouteProvider->getRoutes() #9 /var/www/drupal/apphome/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array) #10 /var/www/drupal/apphome/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #11 /var/www/drupal/apphome/core/includes/common.inc(1170): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #12 /var/www/drupal/apphome/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Controller/ToolbarController.php(191): drupal_flush_all_caches() #13 [internal function]: Drupal\admin_toolbar_tools\Controller\ToolbarController->flushAll() #14 /var/www/drupal/apphome/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #15 /var/www/drupal/apphome/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /var/www/drupal/apphome/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #17 /var/www/drupal/apphome/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #18 /var/www/drupal/apphome/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #19 /var/www/drupal/apphome/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #20 /var/www/drupal/apphome/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /var/www/drupal/apphome/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /var/www/drupal/apphome/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/www/drupal/apphome/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /var/www/drupal/apphome/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /var/www/drupal/apphome/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /var/www/drupal/apphome/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /var/www/drupal/apphome/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /var/www/drupal/apphome/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #29 {main}.