I'm afraid I don't have a specific example in GDScript, but I have written enterprise software where this was the case.
When talking about the speed of languages we often focus on the runtime speed. But another important factor is development speed. In my experience, an interpreted language such as GDScript or Python has a much faster development speed than a compiled language. This is really great for prototyping, especially when you don't know exactly what changes you might have to make on the fly.
The philosophy that I have is to avoid premature optimization. And what I mean by this is that I'm going to write the program the simplest way I can think of the first time. Of course, the first draft isn't always the best solution, and if there are issues they'll make themselves apparent. Once they make themselves known, then we can address resolving them.
So now that you've identified an issue you can work on optimizing it. You'll want to do some profiling to find the problem areas, but generally the issues will make themselves known. Some portion of the program will need a rewrite and you can begin working on that. There might be bad control flow or an unhandled error, and those are easily fixed. But sometimes it boils down to a computationally expensive algorithm.
If you encounter a problematic algorithm, you might have to write it several different ways to figure out what's fastest. After all, most problems can be solved in many different ways. But eventually, you're going to find your fastest solution. And if that solution still isn't fast enough, then it could be time to look at switching to a compiled language.
I guess what I'm getting at is that out of all the tools in the toolbox, rewriting to another language is the last one I reach for. However, it is still sometimes the correct solution.
Thank you for reading this far. As for some Godot stuff, they have this cross-language scripting feature. Basically, you can fairly easily interface some C# into your GDScript when and where you need it, instead of deciding on one specific language at the start of your project.