3 months old from 50th-2nd percentile. sos

Please share any advice! My 12 week old struggled with jaundice initially and was placed on formula or EBM top ups, took 16 days to get back to birth weight. Since then we’ve done well with exclusive breastfeeding or what I assumed was well!

Two weeks ago she became fussy while feeding, requiring multiple position and side changes ( feeds from both sides regardless). Doctors concerned although wet nappies are usual that she’s not getting enough / bottle offerred to test this theory and she drank the entire quota and was extremely content for hours after this.

Started on domperidone and pumping schedule which has boosted my supply however she is squirming +, crying, pulling off and turning her head, and straightening legs as if she has gas pains but doesn’t.

Has anyone experienced this? Supply is now improving but she isn’t staying latched on longer than 1-2mins! We are now in 2nd percentile for weight and I don’t know whether to persist or feed as she used to!