Myanmar’s military-backed government says it has regained control of two towns near the country’s borders with India and Thailand.