I think, your script isn’t working properly because it’s running too early, before all the data is fully loaded. Instead of using onload_post_render, try using the refresh event, which ensures everything is loaded.
Try it.
frappe.ui.form.on('jobnum', {
refresh: function(frm) {
if (frm.doc.phase && frm.doc.phase.length) {
const options = frm.doc.phase.map(row => row.data_rcui);
frm.fields_dict['second_child_table_name'].grid.update_docfield_property('po', 'options', options);
}
}
});