Database Failover Sticky Mode

On my gateway, I have set up two database A and B, B is the failover database of A. After configuring B as the failover database and choose STICKY mode in A’s configuration page, I did a test.

after shutting down A, the query did get switch to B. But after bringing A back, didn’t restart gateway, didn’t restart B, the query got switched back to A automatically, even with STICKY mode.

The query I used is from python script, not named query.

Does anyone know why the STICKY mode doesn’t work?