A: Always declare variables!
B. You have st the pattern to be "GREEDY" - this means it will look for the first <code1> and keep looking till it gets to the last </code1> and delete everything in between. Use a ? in the pattern to set to NON GREEDY
Sub sync_text()
'Declare variables
Dim input_text As String
Dim output_text As String
Dim regX_delete As Object
input_text = ActivePresentation.Slides(1).NotesPage.Shapes(2).TextFrame.TextRange.Text
' Delete code1
Set regX_delete = CreateObject("vbscript.regexp")
With regX_delete
.Global = True
.Pattern = "<code1>(.+?)</code1>"
End With
output_text = regX_delete.Replace(input_text, " ")
ActivePresentation.Slides(1).NotesPage.Shapes(2).TextFrame.TextRange.Text = output_text
End Sub