Did you use Disk Utility to resize the partition or Ubuntu? Ubuntu is not able to resize an Apple APFS partition since it is more complex than a standard partition, plus Ubuntu only has rudimentary support to read an APFS volume (I would not trust writing to an APFS volume using Linux). If this is the case, then you will most likely need to start over. You can try using Disk Utility to erase what is left of the existing Apple partition & reinstalling macOS to it which may leave your Ubuntu system intact.
The general rule is only to use tools associated with the OS which controls the partition in order to manipulate that partition. Only that OS knows how to properly handle such things. However, dual booting to the same drive complicates matters since changing the partition layout from one OS may have disastrous consequences for the other OS....more than likely it will make the other OS unable to boot (perhaps that can be fixed, but it will take some work usually involving the command line).
FYI, I never recommend partitioning any drive for exactly this reason & the issues you encountered. If you want to use Linux, then either install Linux into a Virtual Machine, or if you need the full system resources of a bare metal installation, then install Linux to an external USB3 SSD. Of course if you have an M-series Mac, then currently is only possible to install Linux to the internal SSD if a bare metal installation is needed (even when Linux acquires the ability to be installed & booted from an external drive on an M-series Mac, it will still require adding a specialized boot partition to the internal SSD of an M-series Macs due to how these new Macs boot & work).