This has been addressed in other discussions, below post of mine might be useful.
Getting into Schengen area from Portugal and then travelling within Schengen with an expired-card should be doable in theory but is not 100% bullet-proof. Especially with Covid some border controls were re-introduced though I expect much of this to be removed.
I asked this question to my lawyers, they told me that as a holder of an expired card, with the extensions (decrees) I am a legal resident in Portugal, but it is not as straightforward when it comes to travelling within Schengen with the expired card.