I found a similar topic, but that issue was caused by the remote event being fired without a condition inside another script. Are there any fixes to this issue that I should consider using?
If you want a connection to prevent code from running, then use a flag variable in the top scope.
local start = false
remoteEvent.OnServerEvent:Connect(function()
start = true
end
while true do
if start then
start = false -- remember to reset it
...
end
end