MariaDB starting with 10.4.2
----------------------------
WSREP_LAST_WRITTEN_GTID was added as part of Galera 4 in MariaDB 10.4.2.

Syntax
------

WSREP_LAST_WRITTEN_GTID()

Description
-----------

Returns the Global Transaction ID of the most recent write transaction
performed by the client.

URL: https://mariadb.com/kb/en/wsrep_last_written_gtid/