I’m a bit out of my league here. I try to avoid such small pitch components and do not design enough PCB’s to have real experience in this area, but I try to write something that makes sense…
Your QFN (I think) has a pitch of 0.4mm, which only leaves 0.2mm for the pads and their clearance each, and at that resolution it starts to become difficult to put the soldermask reliably between the pads.
By default KiCad has a “Solder mask clearance” of 0 (I think) and this means the solder mask has the same pad size as the pads, and this is something I do not understand well. The result is that the exposed copper area of the pad gets smaller with any misalignment between the copper layer and the solder mask, and this is not logical to me. I do know though that a lot of attention is put into KiCad’s libraries to follow IPC guidelines, but it’s a conflict in my head for which I do not have a solution.
You can set a global variable for this in Pcbnew / File / Board Setup / Defaults / Solder Mask/Paste / Solder mask clearance: You can also override this global value for individual footprints or individual pads.
And then it starts becoming more difficult:
There are ideas like SMD (Solder Mask Defined pads) and NSMD Non- SolderMask Defined Pads:
Source (with explanation):
By using different sizes for the mask and the copper, the size of the exposed pad stays the same if there is misalignment between the copper and the mask, and this results in a better defined soldering process. Macrofab uses BGA’s, but the same is true for and SMT footprints that are soldered with reflow, and therefore have a fixed amount of solder on each pad.
If you want to use Solder Mask Defined pads, then this probably means that you want to make the copper of the pads wider. In your case around 0.25mm, and if it’s difficult for your fab to make the 0.2mm “fingers” for the solder mask cutout, the mask can be made a bit smaller (for example 0.18mm), which results in thicker “fingers” of 0.22mm. (My numbers are just an example, NOT based on experience nor guidelines).
Changing the mask clearance is quite easy in KiCad, but for changing the size of the pads themselves you have to modify all the pads of the footprint.