With the use of segwit, transaction data is no longer part of transaction body
That’s incorrect. It’s just not covered by the txid, but it’s still an integral part of a transaction. Every updated full node will download the witness data, and if they’re storing blocks, also remember the witness data.
and thus can’t be retrieved from block explorers.
That would only be the case of the block explorer doesn’t support segwit.
For example, here is a recent segwit transaction (with witness data included) on blockstream.info.
So is there a Bitcoin rpc method in order to get it.
getrawtransaction will give it to you (it needs the txindex=1 config option, though).