Using Lua tables, it doesn't matter if a property is declared or not, so it should be possible to set new values to Lua instances from Lua regardless of property declaration. It won't work from GDScript or other languages, but people might be writing all scripts in Lua, so it's more useful to have script instances automatically unboxed, if available.
Using GD.get_lua_instance from Variant.unbox should be enough, falling back to the original Object pointer if there is not Lua script attached to it. The cost of this operation is a single table index, so it shouldn't be a problem regarding performance.
Using Godot Object pointers provide unexpected results regarding the access to properties that are not declared (see https://github.com/gilzoide/godot-lua-pluginscript/discussions/46).
Using Lua tables, it doesn't matter if a property is declared or not, so it should be possible to set new values to Lua instances from Lua regardless of property declaration. It won't work from GDScript or other languages, but people might be writing all scripts in Lua, so it's more useful to have script instances automatically unboxed, if available.
Using
GD.get_lua_instance
fromVariant.unbox
should be enough, falling back to the original Object pointer if there is not Lua script attached to it. The cost of this operation is a single table index, so it shouldn't be a problem regarding performance.