Very little training in breastfeeding required for midwives, and it never needs to be refreshed or topped up.
Breastfeeding training for hvs even more basic. No breastfeeding related content in training for GPs.
"Infant feeding specialist" midwife does not need any extra training. Sometimes you'll find the IFS is a trained IBCLC or breastfeeding counsellor which is brilliant, but this is very rare.
This means if yours does have good knowledge it's likely due to their own personal interest, they may have undergone extra training at their own expense. Lactation consultants (who do need to do a huge amount of training, keep knowledge up to date etc) not routinely employed by the NHS although may be hired for a midwife role.
Midwives only support mums for 10 days and therefore do not see the long term impact of their advice. Most are overworked and understaffed. They do not have the time to sit with a new mum and get breastfeeding off to a good start properly. Often goals are short term: e.g. improve blood sugar levels, increase weight gain. You can do that in a very quick way by introducing formula. You can also do it in a longer and more complicated way by looking at the causes of the problem and supporting mum e.g. with latch, dividing tongue tie, assessing other issues. But this time is not often available and so the knowledge is not used and becomes forgotten.
There is very little support once somebody has introduced formula by choice or medical need. Ideally you would then be supported to protect breastmilk supply and be enabled to continue breastfeeding alongside that formula. Instead the attitude seems to be that it is all or nothing, that once you've started bottles it's inevitable full formula feeding will follow. Some volunteer type breastfeeding groups help with return to full breastfeeding but very few will support combo feeding, which is counterproductive.
Because most people bottle feed (and even more so in the previous generation) that means expectations of babies and feeding are generally based on bottle feeding. This does not always map nicely into breastfeeding, leading mums to worry that they have a problem when perhaps they do not. Or even simple things like how you hold the baby (different for BF and bottle feeding) which can make BF difficult if you try to transfer it across or bottle feeding ideas like trying to stick to a set X-hourly routine. Breastfeeding feeling like something "weird" or "hippyish" or "not for people like me".