Godot unfortunately does not have a built-in way to export gifs, so we are using this addon https://github.com/jegor377/godot-gdgifexporter
I tried on my pc and a friend's one and when generating a gif it crashes or this error appears
E 0:00:08.230 getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: nullptr
<C++ Source> ./core/rid.h:151 @ getornull())
and generates a bad gif. Like it seems that some frames are not generating correctly.