Replace ES master node

Thanks. There's another weird problem. With 3 ME nodes A,B,C, and minimum_master_nodes=2 if any of the nodes goes down, the app fails as it would with a single node, with these errors:

[2020-03-20T23:55:07,781][DEBUG][o.e.a.s.TransportSearchAction] [sun.example.com] All shards failed for phase: [query]
org.elasticsearch.index.query.QueryShardException: failed to create query: {

Would you know what the reason could be?