Confused due date

Laura

So my last period was 22.11.2019 however they weren’t regular as I’m still breastfeeding my doctors say I’m due 7.9.20 however my scan says I’m due 28.8.20 drs are going by the date they decided for me based of a cycle or 40days there’s 10 days difference between which one would I go by?