I sometimes have had a problem when casting using commercial fluxes that may have a high boric acid content, It seems to stick to the fluid metal pour more than straight borax, and I’ll find it’s residue on the sprues and even on the casting itself displacing metal. I no longer use boric acid for fluxing purposes other than mixed with denatured alcohol as a fire scale preventer. I’m wondering if you may have a problem similar to what I’ve seen. Now when casting, and sometimes when soldering I use straight borax powder. For most soldering, I use a liquid flux like Batterns, and rarely a paste flux like Handy flux. Most pits in solder are caused by a contaminated joint and that would be the first place I’d look. As you don’t name the type of flux or brand used, it’s hard to give you a more definitive answer.