The reason for picking a specific version, is so you are in control of what you are running. Without that anytime you recreate the container it will upgrade. And then if you have a problem you need to figure out if it’s the new version vs the container config change.
Every time I upgrade HA, I shutdown MariaDb, and copy the database folder to a new folder name (for example mariadb_2025_3_2). Sometimes HA version upgrades also update the database schema. And sometimes those upgrades fail. So by copying to a new folder (use cp -rp) you can always roll back. I do the same thing for the HA folder.