Paint is going through mask
not really. In wheight paint mode you are a assigning wheights to the vertecies of the mesh. what you see between the vertecies is only colored based on the vertecies around it. so if you have a base mesh with not that much geometry and you have a vertex an you have one in the mask and one outside, blender cant do better that  to make a gradient between them.
hte only way to make that effect less pronouced is to give the wheight paint more vertecies to work with.
If its crucial that you have a sharp edge you could copy it ad apply the subsurf modifier i assume you use. Or dependant on your use cas you could also switch to a texture map instead.