Aerial view of shipping containers sitting stacked at Lianyungang Port on June 3, 2019 in Lianyungang, Jiangsu Province of China. Wang Jianmin | Visual China Group | Getty Images

In an interview with CNBC's Tanvir Gill, Mahathir acknowledged the hurdles in reaching a deal among the 16 countries. "I think we will work towards it. It's quite difficult because we are competing economies ... we're competing with each other and from there, to go on to work together requires some radical change in our mindset. That will take time," he said in Bangkok, Thailand, where he's attending a summit for the Association of Southeast Asian Nations.

In the end, we have to stop this trade war and certainly not to escalate (it). Mahathir Mohamad Malaysian Prime Minister

The Malaysian leader added that RCEP participants will have to consider which framework works best: China's proposed 13-nation deal or the original one involving all 16 countries. "But I think I would prefer 13 ... for the time being," he said, suggesting he's open to having India, Australia and New Zealand joining the pact in the future.

Trade war escalation

Malaysia has often been cited as one of the beneficiaries of the trade war as companies move production out of China to circumvent elevated U.S. tariffs. Muhammed Abdul Khalid, an economic advisor to Mahathir, told CNBC in May that the Southeast Asian nation's growth is set to gain an additional 0.1 percentage points due to the trade diversions to his country. While that's good for Malaysia, Mahathir on Saturday cautioned that such benefits may only be temporary. He explained that if there's a change in government in the U.S., the new administration may have a new set of policies that could once again prompt companies to rethink where they want to locate their production and supply chains. "In the short term, I think it is good news. But in the end, we have to stop this trade war and certainly not to escalate (it)," he said.

WATCH: Discussing the impact of RCEP on China and Southeast Asia