IANAL. My understanding is that you can do consular processing even if you are in the US, it's just that you need to leave to do the interview (and things like biometrics) and get the actual visa.
Now I'm not sure if you are allowed to re-enter after your interview before your case is decided/you get the visa but I would imagine so (if have valid visa), you would just need to exit again to get the visa later.