The reason it is doing this je because ChatGPT is actually generating some type of markup language at the same time. It is probably looking at the matkup it generated and thinking "this tag doesn't have the same letter as the next