In most (cases functions returning a PyObject pointer requires it to be used by the caller, declare functions in the Python API with the `nodiscard` attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
extern
Pull Request: https://projects.blender.org/blender/blender/pulls/128081