I have no idea how to use Godot 4’s file API, but it looks like you are not closing the file after storing the variable…