Well, I am a Portuguese-British dual national, with homes and family in both countries. I spent more than three months in Portugal in 2024 for various family matters.
Unless you're doing all your shopping at Apolónia and/or following a British diet you're just really wide of the mark on prices. Yes, processed food is much more expensive there because it's a minority interest and therefore a small, uncompetitive market, and it attracts IVA at 23% compared to 6% for completely unprocessed foods and the 16% intermediate level. Also, out of season imported produce isn't subsidised by other product lines like it is in the UK. There are huge variations in local prices according to seasonality, whereas in the UK supermarket prices tend to stay comparatively constant all year round and promotions have little to do with seasonality - the cheapest courgettes I've ever bought in the UK were in February, which is bonkers.
With reference to @Hopealong the other thing about locally-produced Portuguese food, especially in supermarkets, is that there is often a premium attached to 'Produto Português' which better off chauvinistic locals (especially those who have lived/worked in France, cos it's the same there) are happy to pay.
I can assure you through decades of my own experience that living like a typical Portuguese, in Portugal, is much, much cheaper than living like a typical Brit in the UK, and certainly than trying to live like a Brit in Portugal. As I said upthread, dried beans are less than half the price there. Fresh fish of all kinds - with much bigger range of species - is an order of magnitude cheaper than in the UK, but canned tuna is cheaper here. Fresh pork in Portugal is extremely cheap, and you can buy really cheap cuts of all meat which are often very difficult to find in the UK, but salsichas (sausages) are incredibly expensive because of the 23% IVA levied on them.
Then factor in that outside of the big cities, nearly everyone will know someone who keeps a pig. Anyone with a garden or land will grow some of their own salad and veg, and fruit. Because everything ripens at the same time there are huge seasonal gluts of home-grown stuff which get freely given amongst friends. Same when you slaughter your pig. When we're there for the summer hols we can usually assume that our maid will provide as many tomatoes, green beans, and courgettes as we want, free of charge. The pool cleaner has apricot trees, although we're often a bit too late for the best ones. The flip side is that I have a Makro card and can buy onions and rice wholesale, much cheaper than in the supermarkets, so I give that in return.
I often reckon that we spend about half as much on groceries in Portugal as we do here.