it's not just the avcs but small differences between the two. They have different piston dishes and the STI also has a lower compression ratio.
As for the swap I looked into this once upon a time. The transmission swap alone can near 10k, the 6speeds in good shape are costly. It's not exactly a direct swap either as it comes with a host of things like the rear diff, axles, hubs, etc.
Usually it's cheaper to sell the WRX and buy the STI. I'm in the market specifically for an STI but it'll be a while. Car prices are absurd and I'm broke for the foreseeable future. I'd personally buy an STI over the WRX, but I'd not try to swap. I had a line on an STI swapped Forester a while back until I found out it was a half finished project. Noped out of that.