If my thesis passed but I failed the oral exam (defense), do I have to re-submit my thesis as well?

No. You need to take the oral exam only. However, make sure that you register for the re-sit and that you also inform the MAT Committee about it.