Is there a way to control the Z-Order of different widgets spawned from different sources?

I friend of mine sent me a previous post with the perfect solution to my issue. I will link it here for any future people who stumble upon this.