I have created an extension called ‘customize clock on lockscreen’ Customize Clock on Lock Screen - GNOME Shell Extensions
on Arch Linux with gnome-shell v48, Line wrapping is working
this._commandOutput.clutter_text.set_line_wrap(true);
on Ubuntu 24.04 with gnome-shell v46, Line wrapping is not working
I have gone through the documentation at DevDocs