If you choose the decoupage solution, such a power supply will certainly not be cheap.
You will need to protect it against power surges and transients.
There must be a tolerance of + 10% of the network voltage, so a rectified voltage can reach 594V
1) to protect the rectifier diodes against industrial electrical network transients, 3 x 50Hz protection induxtances should be placed at the input.
2) with such a high dc voltage, the best configuration in order not to stress the components too much (transformer, semiconductors) is the forward configuration with 2 switches with reset of the core.
https://www.onsemi.cn/pub/Collateral/TND378-D.PDFThe voltages in a flyback configuration are too high especially since the dimensions of a 25W ferrite transformer are very small.
You will need to use quality components which will not come cheap.
NB: I apologize to the moderators for having published 3 answers by following, but I did it for clarity because they relate to 3 very distinct points of view