You are not operating under IFR in the tower pattern if in the United States, so the short answer is yes.
It is not unusual at all to shoot an instrument approach to a runway, execute an option, (i.e. touch and go or low approach) and then turn downwind into the tower landing pattern. Generally tower will ask you to squawk standby to declutter approach control’s scope.
It is correct that when cleared for a visual approach you are still on an IFR clearance. However, what is imporant is the pilots specific words to the controller after aborting the landing: If the pilot stated “missed approach” and began executing the IFR missed approach procedures he/she should expect to continue to be given IFR handling, i.e. vectors by the approach controller to set up for another instrument approach. This is especially true if still talking on approach control’s frequency.
However, if the pilot is on tower frequency, weather is VMC and the tower pattern is open, and for fuel or other reasons the pilot desires to turn downwind immediately after aborting a landing, the request should be stated unambiguously: For example something like, “Tower, N123WP going around, request left/right closed traffic for landing”. This effectively cancels IFR, makes intentions to remain VFR in the pattern to expedite landing clear, and approval from tower along with a request to change squawk would be entirely appropriate.
The pilot in this case stated "going around" and it sounds like tower made a reasonable assumption about intentions based on weather conditions and the fact that the pilot had previously requested visual to a full stop. (Requesting an ILS approach to the option could imply multiple practice instrument approaches might be desired for training...)
If this is not what the pilot wanted, it needs to be rebuked clearly and immediately. For example, “Negative, N123WP is executing the missed approach, request IFR vectors for another visual/ILS/RNAV approach runway 25.”
Instead the pilot accepted tower's clearance to turn downwind into the VFR pattern, and the change to a 1200 code was proper.