There's no static definition. Traditionally, they have turn based battle systems of some sort, but action RPGs make the definition more fluid.
Usually, it means it's a power fantasy where you are constantly getting stronger by and you have a lot of agency in terms of how you want to grow your character/team.
I don't think agency in story/character is really required, as most FF games have fixed characters and story, and they're still considered RPGs. This is more of an aspect of WRPGs, but less so JRPGs.
In FF6 you don't actually have very little choice in how you build out your characters, but you have a lot of characters to choose from.
In FF7/8 you don't have many characters, but you have a lot of choice in terms of what kind of abilities they can equip.
In FF13 you have very little choice in general. Characters have an optimal role, instead you're actively changing your battle strategy
FF16 is an interesting one, because although you don't have that much options in terms of stuff like weapons, you DO have a lot of agency in terms of your playstyle depending on what eikons you equip and what abilities you use. Certain loadouts can completely change how you play especially once you reach the midgame.