Debugger refresh makes preview freeze when Terrain3D object exist in the scene

Describe the bug

When your scene has any terrain3d object Pressing the Refresh button makes the preview freeze and you get nothing in the inspector.

For the empty project only one terrain3d object causes Runtime Serialization taking over 2000ms

As you can imagine even in a small-medium size games like the GDevelop templates that uses terrain3D who knows how much it is gonna take.

Well I tested on 3D GTA Expanded and I waited 7 minutes and preview was still in freeze and there were no data in the inspector.

So this issue makes the inspector unusable if your scene contains Terrain3D.

Also I believe this issue is exist in the Heightmap3D extension too. Because back in the time when I was experimenting with Height Map 3D I remember I was getting the same freezing and nothing showing up in the inspector.

Steps to reproduce

  • Create an empty project > press preview > in the debugger inspector press refresh

  • You will get RuntimeGame serialization took 2ms in the console

  • Place a any terrain3D into the scene > Preview and press refresh in the debugger inspector

  • You will get RuntimeGame serialization took 2000ms (number varries depending of the terrain)

  • And Console warning saying Serialization took a long time: please check if there is a need to remove some objects from serialization

  • So when your game gets bigger and you edit the Terrain object, RuntimeGame serialization never happens. You only get the freezed preview.