I had a 99 Outback a long time ago.
I was having that issue with the temp climbing up and going back down. It was the head gaskets. It was a hairline break, causing exhaust to leak into the coolant.
You’re going to need to check your coolant for exhaust.
It won’t show up unless you can get it to overheat.