How to Object.freeze wp_localize_script

No, it is not possible to do this from wp_localize_script().

You would need to add add Object.freeze( text_ajax ); to the beginning of your script.