### Godot version 4.1.1 ### godot-cpp version 4.1 ### System information Fedora Silverblue 38 ### Issue description  This function results in a memory leak. Recreating this function line by line in GDScript doesn't result in memory leak. I've tried to return Dictionary as is:  Which works fine. Callable and `callv()` are affected too. ### Steps to reproduce N/A ### Minimal reproduction project [gdextension-memory-leak-main.zip](https://github.com/godotengine/godot-cpp/files/12576484/gdextension-memory-leak-main.zip) You can also view it here: https://github.com/Lasuch69/gdextension-memory-leak