JSONPath is a part of SQL Standard. MySQL and MariaDB support a subset of it: “lax mode” only, no support for predicates, etc.
But even the lax mode implementation has behavior different from the standard: MDEV-40746: JSON Path computation doesn’t do lax mode unboxing. The same non-standard behavior can be observed in MariaDB, MySQL, and MS SQL Server.
I’m pretty sure MariaDB has inherited MySQL’s behavior (despite having its own JSONPath engine). What I’d like to know if MySQL did this intentionally (and why?) or it is just a bug.