If you want - try code below and you will remove guest sidebar.
If you're using a left sidebar, open a global template and find
{template="sidebar" if="theme.sidebar_position == 'left'" app="core" group="global" params="'left'"}
Replace it with
{{if member.member_id}}
{template="sidebar" if="theme.sidebar_position == 'left'" app="core" group="global" params="'left'"}
{{endif}}
If using right sidebar, find in global template
{template="sidebar" if="theme.sidebar_position == 'right'" app="core" group="global" params="'right'"}
Replace it with
{{if member.member_id}}
{template="sidebar" if="theme.sidebar_position == 'right'" app="core" group="global" params="'right'"}
{{endif}}
This will remove the sidebar when visiting guests, and you will see if the issue occurs again on your site.
Absolutely! Rest assured, I'll make sure to share a solution that will be of great help to others. Currently, this issue has caused my entire website to go offline. The CPU resources were maxed out, but I remain optimistic that a speedy solution will be found.