How do I shrink my Ubuntu partition and reabsorb the freed space into my Mac OS Mojave Partition?

For this question, I created a partition called "Ubuntu" but not really Ubuntu. Just a random partition that's only 3 GB but it should work the same way.

First of all, you will have to go to Disk Utility and choose "Show All Devices"

Then click on the top Disk and click "Partition"

You can then click on the "Ubuntu" piece of the pie chart and change the size from 65 GB to 25 GB or whatever you want it to be.

Click "Apply", wait for the process to finish, then it should be resized! Comment if you have any problems.