Why not? Any lawyer would object to a judge trying to get their client to commit on this issue with more witnesses left to call whether it was in front of the jury or not.
If it’s in front of the jury, the question itself is prejudicial. The jury may wonder why Zimmerman is not testifying, and the judge’s insistance makes that seem more out of the ordinary.
If it’s in the judge’s chambers, that’s a different matter. At least then it’s out of hearing of the jury. It may be annoying, but it’s not prejudicial.