Are there any engine codes (check engine light)? Not saying this to be mean but for clarity: running well isn’t important - are there any check engine engine lights or codes?
Check if the ATF pan is dented. It can cause problems much easier than a dented engine oil pan.
You can attempt to extract the AT codes:
some newer Subarus like 2005 ish I think but I forget the years, I have a very easy way to read the codes without any scanner. Not sure it applies to 2002
or the classic schizophrenic multiple personality disorder meth smoking strategy Subaru employed here which you can do yourself with no scanner: