Cannot boot into osx after partitioning in macos
I need more information about your partition tables. Please do the following.

Boot to Ubuntu.

Use control+option+T key to open a Terminal window.

Enter the commands shown below.

sudo fdisk -l /dev/sda
sudo gdisk /dev/sda


The gdisk command is interactive. Enter the P key followed by the Q key.

Post the output from these two commands to your question.