If a partition is shrunk down to give more space in a different partition, if the unallocated space is to the “left” of the partition you want to expand, it won't work with the built-in partition programs on Windows or Ubuntu. The process will also need the use with an external program that can clone partitions to move the positioning of the partitions.
In the instance of wanting to shrink a Windows partition to expand Ubuntu, but Windows was installed on the drive first, here is how the process can resolved using the disk partition applications of the operating systems and the program CloneZilla
The safest way to resized a partition is in the individual operating systems
Note: If your Ubuntu partition is larger than the new partition, you will want to shrink Ubuntu to be smaller. Ubuntu partition must be smaller than the new partition for the cloning process to work
To run CloneZilla, you will need the program installed on a USB thumb drive. It can be easily done by anyone using Rufus and the .iso file type install of Clonezilla. There is also a currently working CloneZilla thumb drive in IT, but we request that anyone who needs to use it stays in IT while running CloneZilla.