The Vajrayana practice usually called deity yoga, Sanskrit devatayoga, Tibetan yidam, is where the question of whether Buddhist figures are gods becomes sharpest, because it looks the most like worship and is doctrinally the furthest from it.
The practice involves detailed visualisation of a deity and the deity's mandala, together with mantra recitation and liturgy. A practitioner may spend years with Vajrayogini or Chakrasamvara or Yamantaka, building the image in precise detail, making offerings, reciting. To an observer it resembles the cult of a god closely.
The doctrinal position is that the deity is not an external entity. It represents an aspect of the practitioner's own awakened nature, and it is a form to be realised as oneself rather than a being to be petitioned from outside. This is not a modern rationalisation; it is what the systematising literature says the practice is for.
The mechanics are set out in two stages. In the generation stage, utpatti-krama, ordinary perception is first dissolved into emptiness, and reality is then reimagined through the enlightened form, the practitioner developing what the texts call clear appearance and divine pride, the settled sense of being the deity. In the completion stage, nispanna-krama, the practitioner works with the subtle body and its energies to realise the nature of mind directly.
Divine pride sounds dangerous and the tradition knows it. Ju Mipham grounds the practice in an understanding of emptiness, without which the visualisation would be an elaborate fantasy. John Powers notes that divine pride rests on emptiness and compassion together, which is what is supposed to stop it inflating the ego rather than dissolving it.
This is why a yidam is not straightforwardly a deity and why the tantric material is transmitted under initiation rather than published. Without the emptiness teaching the practice is understood to be not merely useless but actively harmful.