The AP might not accept a very out of trim aircraft, and might give it straight back to you.
You don't need this and the cavalry charge attention getter on top of an engine failure, so best to trim the rudder before AP engagement. You might need to hold the trim switch over for about 12-15 seconds.