It was always a public/nationalized company. It started 100% owned by the government. In the 2000s, around 15% were sold to pension funds, so way over 80% in the hands of the state, which by EU rules (and common sense) makes it a state company.
The floating shares were bought back in order to facilitate the nuclear expansion plans.
The losses in 2022 were largely due to the energy crisis because of Russia's invasion of Ukraine, which interacted rather nastily with the French ARENH program that requires EDF to sell 25% of its power output for 4 cents/kWh, no matter what the market rates. And no matter if it needs that power itself.
When the energy crunch hit in 2022, wholesale electricity rates rose up to €1 / kWh. So EDF had to sell its electricity for 4 cents, then buy it back at 25x markup for €1.
Oh, and the government actually increased the ARENH quotas to more than 25%, because it used EDF to subsidize consumer/industry energy prices, something that was done by the states directly in other countries.
The problems with a part of the fleet, largely due to deferred maintenance during COVID, also didn't help.