I’d clear the codes, pull the ABS fuse and then read the codes and post them all here. Theres a chance you may have separate issues. I don’t see the ECU running the engine perfectly fine but causing the ABS to go haywire that seems very unlikely
post us some check engine and any other system codes
If you try programming the ECU let us know how it goes I’ve got an Autel scanner that does all the SRS, VDC ABS, etc, but don’t know if it has that functionality
Use Subaru headgaskets too on that other engine.