It actually isn't related to ray casting, as I just found out I can use CollisionObjects to serve the same purpose I needed raycasting, and I don't have to then use code to calculate the hexgrid geometry.
Here's the code:
/* --- hexTile.hpp --- */
MeshInstance* _hexMeshInstance = MeshInstance::_new();
Ref<ArrayMesh> _hexMesh = _loader->load("res://assets/meshes/hex.obj");
CollisionObject _collisionObject;
Ref<Shape> _collisionShape;
int _shapeOwner;
/* --- hexTile.cpp --- */
void HexTile::_init()
{
_collisionShape = _hexMesh.create_convex_shape(); // Throwing the error
_shapeOwner = _collisionObject.create_shape_owner(this);
_collisionObject.shape_owner_add_shape(_shapeOwner, _collisionShape);
}