MySQL & MariaDB error 4051 ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON
Same number, two different errors. 4051 means one thing in MySQL and another in MariaDB. Check which server you are connected to.
MySQLaudit_log_format_unix_timestamp is applicable only when audit_log_format = JSON.
MariaDBPath expression '$' is not allowed in argument … to function '…'.