Revert "replace double transpose with single permute in nn.f.mha (#89847)"
This reverts commit b9afa928271dfd6b80ddb2367fa1c4f4aba25fe4.
Reverted https://github.com/pytorch/pytorch/pull/89847 on behalf of https://github.com/jeanschmidt due to Need to revert this commit as it is causing conflict when reverting #89470