If everything suggested in the previous posts checks out, try the Subaru Upper Engine Cleaner (UEC) fuel rails soak.
This was a tip shared by former Subaru technician Steve Siladi aka Sharpie on the lib club Facebook group, in response to a gen4 GT rough idle diagnosis post.
Fuel rails and injectos UEC soak:
Pull fuel pump fuse.
Cycle starter to reduce fuel pressure in rails, short cranks as to not burn out starter motor.
Remove fuel rail hoses supply and return where convenient and according to FSM procedures.
Use compressed air to blow remaining fuel from fuel rails.
Fill fuel rails/lines with UEC.
Let it soak, eg overnight.
Use compressed air to blow remaining UEC from rails/lines.
Reattach hoses as per FSM procedure, replace fuel pump fuse.
Key on to acc, prime fuel rails, check for fuel leaks.
Crank engine and pray
Alternatively, whilst soaking the fuel rails in UEC, remove the spark plugs, pressurise the UEC in the fuel rails (get creative here, eg use compressed air, pressure bleeder etc) and crank the engine using short cycles again.
Use compressed air to blow any remnant UEC from the cylinders, replace the spark plugs and resume the rails/lines soak.
The general idea is to use UEC in the rails, lines and injectors, instead of getting your injectors cleaned or replaced.
In general, proper diagnosis includes but it not limited to basics like compression test, inlet and exhaust vacuum tests, and in the case of a modern car logging the performance of the various sensors used by the ecu.