Repository: godot
Issue: System.InvalidCastException: Unable to cast object of type 'Godot.Resource' to type 'Blackboard'
Labels: needs testing,topic:dotnet

### Godot version

4.2. beta 5 - 4.2 rc2 Mono (C#)

### System information

Fedora 39 (XFCE, Gnome, KDE) - Godot 4.1 - 4.1.1, Dotnet 7,8, Ryzen 5950, Geforce 3080, 128gb DDR4 RAM

### Issue description

Currenlty using Godot 4.2 rc2 tested also on beta 5. I have a custom resource which I can create from the editor: https://pastebin.com/3Vwu3n6B and assign it to array of resources in my CutsceneAction script which also inherits from the resource and is also marked [Tool] [GlobalClass]. Here are the relavant parts of the other scripts:

```cs
using Godot;
using System;
using Godot.Collections;

[Tool]
[GlobalClass]
public partial class WaitForBlackboardValueCutsceneAction : CutsceneAction
{
    [Export]
    public BlackboardSourceType BlackboardSourceType;
    [Export]
    public NodePath UnitPath;
    [Export]
    public Blackboard ReferenceBlackboard;
    [Export]
    public BlackboardCheckType BlackboardCheckType;
}
rest of the code

```

and then I use the cutscene action here: 

```cs
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;

public partial class Cutscene : Node2D
{
    public CutsceneController cutsceneController;

    [Export]
    public string CutsceneName = "";

    [Export]
    public Blackboard blackboard = new Blackboard();

    [Export]
    public Godot.Collections.Array<CutsceneAction> CutsceneActions;
    private Queue<CutsceneAction> CutsceneActionsQueue = new Queue<CutsceneAction>();

    private List<CutsceneAction> CutsceneActionsInExecution = new List<CutsceneAction>();
    private CutsceneState state = CutsceneState.Idle;
}

```

The main collection I have is the exported one. Others are temporary for the cutscene purposes. I'm running into this issue only witht the WaitForBlackboardValueCutsceneAction and I have 15 other cutscene action types where I also use custom resource.

The errors I get on runtime:
ERROR: System.InvalidCastException: Unable to cast object of type 'Godot.Resource' to type 'Blackboard'.
   at Cutscene.SetGodotClassPropertyValue(godot_string_name& name, godot_variant& value) in /home/name/Development/GodotProjects/project/godot-project/Godot.SourceGenerators/Godot.SourceGenerators.ScriptPropertiesGenerator/Cutscene_ScriptProperties.generated.cs:line 65
   at Godot.Bridge.CSharpInstanceBridge.Set(IntPtr godotObjectGCHandle, godot_string_name* name, godot_variant* value) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/CSharpInstanceBridge.cs:line 57
   at: void Godot.NativeInterop.ExceptionUtils.LogException(System.Exception) (/root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs:112)

But the thing is that the Blackboard can be created via editor: 
![prob2](https://github.com/godotengine/godot/assets/6736045/8697b0c2-f5c0-464e-9fc1-6296d0eb1b99)

But after I run the scene the blackboard in editor is gone and not assignable (options left are load, no option to create):
![prob1](https://github.com/godotengine/godot/assets/6736045/e746673d-34f0-4d5c-be42-2b893f197dc7)

But if I restart the project it's assignable again. Any clue what is going on here?





### Steps to reproduce

/

### Minimal reproduction project

/