I'm always a bit confused when people use attack mode in automation. It was always intended to be a manual only option ;)
ZAP doesnt add requests to the queue on its own.
The requests are always proxied through ZAP.
This can be via a browser, unit tests, the 2 spiders etc.
Right now there is no way to limit the attack mode to ignore the spiders.
That could be added, but would it really be that useful?
Can you check to see what requests are being added to the queue and then work out where they are coming from?
You can always change the ZAP mode from Attack to Standard in order to stop the active scan.
Cheers,
Simon