At some point it's probably healthier for a child to develop their own active immunity rather than gain passive immunity from their mothers breast milk.
There are two main types of passive immunity from the mother - to simplify, IgG type antibodies via the placenta and IgA via the breast milk. IgG type lasts very roughly six months - those antibodies can interfere with just one or two of the vaccines we use (measles) which is one reason why the MMR is given at different times in different countries, but generally after 12m. The ‘best’ immune response comes if you give it aboit 15-18m but as the uk has a high incidence of measles (vaccinate your kids, people) the slightly lower response at 12m is much outweighed by the chance you’d be exposed before 18m.
In some other countries where vaccine compliance is higher, like Sweden, MMR is routinely given at 18m
The other type is IgA, which come via the breastmilk. They are far less effective than IgGs and generally give moderate protection against stomach and upper respiratory tract bugs.
Anyway, passive immunity via bf IgA doesn’t affect the development of the active immune system as far as I’m aware.