Not with the built-in autoswitcher, as far as I'm aware.
You could set up a profile that handles switching according to your own ruleset, which could include waiting until a loop sets a variable to indicate it's in a switchable state(so you can restart it at that point in the next loaded profile) before switching.
That said, loops aren't really designed to permanently run in the background, in the context of VoiceAttack; Looping commands will be terminated just like any other when switching profiles, or stopping all running commands.
If you need something that runs in the background, a plugin would likely be the best way to accomplish that, as you can have much more control over when and how it runs(pretty much the only restriction is that it starts and stops with VoiceAttack itself, provided plugin support isn't explicitly disabled).