Norway, Spain, Ireland and other governments that formally recognized a Palestinian state have not clearly indicated which of the two groups, Fatah or Hamas, they see as the leadership of the Palestinian state.
It is likely that a future change of Palestinian leadership from Fatah to Hamas (recognized as a terrorist group by many Western states) will preserve the status of recognition of the Palestinian state by the above countries.
This prediction is based on historical evidence. After all, most countries continued to recognize Iran, Syria, South Sudan, Myanmar and other states as "states" long after their governments changed and became closely associated with terrorist groups or committed numerous war crimes or crimes against humanity.
References and commentaries:
The Irish premier said the recognition comes from a belief in “freedom and justice,” and that peace can only be secured by “the free will of a free people.”
...
Speaking to Spain’s lower house, Sanchez said that Spain’s recognition is a decision “for peace, for justice and for coherence.”
Norway, Ireland, Spain move to recognize Palestinian state, drawing Israeli fury | The Times of Israel
These statements can be reasonably interpreted that if Palestinians elect Hamas into government, as they had done so in Gaza a while ago, Ireland and Spain will continue to recognize the Palestinian state ruled by Hamas. After all, such would have been then "the free will of a free people" and "justice".
"State Sponsors of Terrorism" is a designation applied to countries that are alleged to have "repeatedly provided support for acts of international terrorism" per the United States Department of State.
...
In 1979, the first such list was published by the State Department, designating Iraq, Libya, South Yemen, and Syria as terrorist states.[3] As of 2024, the list consists of Cuba, Iran, North Korea, and Syria.[4] The countries that were once on the list but have since been removed are: Iraq, Libya, South Yemen (dissolved in 1990), and Sudan. A resolution concerning the addition of Russia to the list was introduced to the senate following Russian invasion of Ukraine in 2022.
State Sponsors of Terrorism (U.S. list) - Wikipedia
The United States called out genocide and atrocities happening in six countries — Myanmar (also known as Burma,) China, Ethiopia, Iraq, Syria and South Sudan — as part of a report highlighting how the U.S. government is using financial, diplomatic and other measures to try to stop them.
Secretary of State Antony Blinken on Monday released an annual report on genocide and atrocities prevention.
"This year, for the first time, the report provides direct detailed accounts of atrocities taking place in specific countries, including Burma, Ethiopia, China and Syria. These places represent some of the toughest foreign policy challenges on our agenda," Blinken said.
US Calls Out Genocide, Atrocities Committed in 6 Countries
See also the list here: Foreign Terrorist Organizations - United States Department of State
The countries found on the above lists, sometimes on more than one list, were continued to be recognized as "states". They are rarely "unrecognized". Similarly, if the leadership of the future Palestinian state changes from Fatah to Hamas, it will most probably continue to be recognized as a state, Hamas' terrorist acts, such as the one on October 7, 2023, notwithstanding.