'Exporting for Linux, OS.is_debug_build() is always true

I'm trying to export my Godot game server with the Linux/X11 preset (plus unchecking "Export with Debug") but calling OS.is_debug_build() is still returning true.

Is there something I'm missing to be able to export as release? Is there another way to check if it's running in debug/release?

I'm using Godot version 3.4.4.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source