If the sensors are replaced or the battery is removed, the ECU learning is reset. If the ECU is reset and there is no learning data, it will take some time to start cranking and start the engine. To learn the ECU, stop all electrical loads (air conditioners, etc.) and let them idle for 10 minutes. After that, if you drive and run 50-100km, learning will be completed to some extent. Subaru learns every 30km, so if you ride for a while, it will get better.