Asking a question in SE might be considered a breach of anonymity?
I think there's two parts to the question, one about anonymity, one about content.

In terms of anonymity, it's unlikely that your paper would be rejected, at least in my field (which is not math/CS). While papers are submitted anonymously, in reality, reviewers sometimes have a good idea of who the author is. A reviewer can recognize the submission's subject area and approach from other work you've published/presented, or be tipped off by little things like the citation of an unpublished thesis (which likely only the author would know about). If reviewers think they know the author, and there's a conflict of interest, they contact the editor; if they don't see a conflict of interest that would bias them toward or against who they think is the author, they just review it. That's been my experience at least.

In terms of content, it's a bit dicier. I know this isn't something you're asking about, but I figured I'd address it for completeness sake. I assume that you're referring to questions that are fairly small, narrow, and specific, and whose answers don't make up the core of your paper. If so, no problem. But an editor or reviewers might take issue with you using answers you get here as your own, especially if they're central to your argument. You probably know that already, and I've never seen it occur in any blind review I've done, but I feel better including this caveat in my answer to your main question.