後足で砂をかける(あとあしですなをかける)

Japanese vocabulary

Meaning: to do something spiteful as one leaves; to take a parting shot at; to kick sand (at someone) with one's hind legs

See it used in real works