Portugal has ambassadors for all EU countries, but some of them are accredited as "non-residents" (Embaixador não residente), which means the embassy is seated elsewhere and serves multiple countries.
Rome/Italy for Malta
There is currently no permanent Portuguese representation in Malta. Matters relating to this country are handled by the Portuguese Embassy in Rome. The Ambassador resident in Rome, Bernardo Luis de Carvalho Futscher Pereira, is inherently (por inerência) the non-resident Ambassador to Malta, having been appointed on 28 October 2022.
Copenhagen/Denmark for Lithuania
There is no permanent Portuguese representation in Lithuania. Matters relating to this country are handled by the Portuguese Embassy in Copenhagen. The Ambassador resident in Copenhagen, João Maria Rebelo de Andrade Cabral, is inherently a non-resident Ambassador to Lithuania, having presented his credentials to that effect on 4 May 2021. Portugal has 1 Honorary Consulate in Lithuania.
Stockholm/Sweden for Latvia
There is no permanent Portuguese representation in Latvia. Matters relating to Latvia are handled by the Portuguese Embassy in Stockholm. The Ambassador resident in Stockholm, Sara Feronha Martins, is inherently the non-resident Ambassador to Latvia.
Helsinki/Finland for Estonia
There is no permanent Portuguese representation in Estonia. Matters relating to this country are handled by the Portuguese Embassy in Helsinki and its Consular Section. Portuguese Ambassador to Helsinki Francisco de Assis Morais e Cunha Vaz Patto presented his credentials to President Kersti Kaljulaid [of Estonia] on 9 February 2021.
Vienna/Austria for Slovenia seems to be handled differently, the overview page does not mention the term "non-resident ambassador".
Between 1993 and 2005 Ambassadors resident in Vienna were accredited as non-residents in Ljubljana. In 2005, the Embassy in Ljubljana was opened; Ambassador Maria do Carmo Allegro de Magalhães presented her credentials as the first Ambassador resident in Slovenia. In 2012, the Embassy in Ljubljana was closed and Slovenia became part of the area of jurisdiction (área de jurisdição) of the Embassy in Vienna.
There is an extra page with "Titulares" that lists the resident and non-resident ambassadors. After 2013, only a "Chargé d'Affaires" (Encarregada de Negócios Interina) is mentioned for the year 2021, when both Portugal and Slovenia held the Presidency of the Council.
This seems to mean the ambassador to Austria is not accredited to Slovenia, for whatever reason, even though the country is in "his jurisdiction".
(All quotes translated by DeepL)
These are only the EU cases. Portugal seems to use this model quite a lot worldwide - I count 115 countries marked this way.
The fact that Portugal has no resident ambassador to a country has no bearing on the opposite: Malta and Estonia have embassies in Lisbon, Lithuania has a non-resident ambassador acting from London, Latvia has one acting from Dublin, and for Slovenia the information is missing.