The correct answer in the end for this question: The function was hanging due to not having enough resources to deploy.
It was a very simple function that was deployed on the lower end of resource groups.
If the deploys are taking very long time and failing try increasing it's resources.