Armhole shaping while keeping pattern correct

I am knitting a cardigan which is Sirdar 3009
I have done the bonnet and got to the armhole shaping on the back and I start off keeping the pattern correct then it goes off course

The pattern is as follows
Row 1: Knit
Row 2: and every alt row, P5, K1,P9, rep from to last 6 sts, K1, P5
Row 3: K9, *K2tog, yfwd, K8, rep from * to last 2 sts K2
Row 5: K8, *K2tog, yfwd, K1,yfwd, S1,K1,psso, K5, rep from * to last 3 sts, K3
Row 7: K9, K2tog, yfwd, K8, rep from * to last 2 sts K2
Row 9: Knit
Row 10: P5,
K1,P9, rep from * to last 6 sts K1,P5


I finished the cardigan on Row 10 of the pattern
And cast off the first 2 sts on Row 1, and then cast off 2 sts on Row 2, so now have 47 stitches
I will now be on row 3 and I have to decrease 1st at each end of next and every following alt row until I have 41 stitches
Could you please help me how to decrease the stitches while keeping the pattern correct x

Sorry Row 2 and every alternate row should read P5, *K 1,P9, repeat from * to last 6 sts K1, P5

https://ebabypatterns.com/product/3009-knitting-pattern

You can account for the stitches that are bound off and subtract them from the beginning of the pattern row (3sts used to bind off 2sts).
The most helpful method however is to look at the pattern you’ve established in previous rows. Use that pattern to determine how to start the row after having bound off or decreased sts. It may mean lining up the eyelets to figure out how the row begins. I often find that the easiest way to to keep the pattern aligned.
You won’t be able to follow the pattern rows exactly as written because of the decreases but the alignment predicted by the previous rows will always put you on track.