If your boilie is breaking off when you withdraw the needle, it sounds more like you are using a baiting needle with too harsh a barb rather the knot causing the problem. Boilie recipes have undergone a change from being hard, which was supposed to put off smaller fish and make them easier to catapult or stick out, to softer which requires less boiling and so they retain more of their nutritional profile and allow water to penetrate them and release their attractants more readily.
I use a Korda needle which is fine enough to penetrate boilies without causing any damage to them.