I'm in trouble about saving my game data

Godot Version

v4.3.stable.steam [77dcf97d8]

Question

I am trying to implement a save game feature for my game.My code is as follows.I defined an object SaveData to serve as my game save entity but I found that the properties of my object must be annotated with @export in order to correctly read and store the values.

# save
var gameSave=FileAccess.open(SAVE_PATH,FileAccess.WRITE)
gameSave.store_var(var_to_bytes_with_objects(saveData),true)

#load
var gameSave=FileAccess.open(SAVE_PATH,FileAccess.READ)
var serialzeSave=gameSave.get_var(true)
var save:SaveData = bytes_to_var_with_objects(serialzeSave) as SaveData

#saveData
extends RefCounted

class_name SaveData

@export var scenePath:String

@export var playerHelth:float

@export var playerPos:Vector2

@export var enemyNodeArray:Array[Dictionary]

What is your expected result and what result are you getting? Also, how are you calling the functions? Is that block of code 1 script or 2 scripts?