Transaction isolation level cannot be changed inside a transaction. Unlike most session variables, session-level transaction properties, when they are modified, become effective from the next transaction. Thus, changing the value for a single statement inside a non-atomic transaction is meaningless and should be prohibited. Now it is not.
Percona server works OK, it returns the expected error:
With MariaDB, the last set statement ... for select returns an empty set, which shows that the tx_isolation setting didn't work.
With Percona server, the same query causes an error.