SET @my_id = (SELECT LAST_INSERT_ID())
Generates the warning in the subject.
> 2020-02-24 15:04:00 warning: (162) The query can't be routed to all backend servers because it includes SELECT and SQL variable modifications which is not supported. Set use_sql_variables_in=master or split the query to two, where SQL variable modifications are done in the first and the SELECT in the second one.
Looks like the SELECT queryi is not properly classified.