That’s what I do. Take it offline, clean it while powerheads are otherwise on, then back online. I pick a time when the ambient temp makes it so that I don’t need my heaters (in the sump) to work.
One thing that’s different when I clean the return pump is that I put in some extra hustle to try to minimize the downtime. I pre-scrub with a toothbrush, then soak for 30 min in citric acid, then brush again, then soak again for 30 min again, then brush, etc. As soon as it’s clean enough I reinstall it, generally about an hour.
The other option would be to swap in a second pump while you clean the first. I do have a backup return pump so I could do this, but I don’t.