If we look in the Rig Veda, Vishnu and Shiva ( Ruda) are minor deities. Later on a certain person or group decided to designate them as all powerful creators, etc.. They also assigned the Buddha as an avatar of Vishnu , for a certain purpose which I will not go into detail here.
The Buddha himself made no mention of Vishnu as his true identity when it comes to his past lives and the like:
Metta Sutta ( AN 7.59) :
" Whenever the world was destroyed, I entered ( by way of rebirth) among the devas of Streaming Radiance, and when the world unfolded again, I was born in an empty Brahma-palace. There, I was Mahabrahma, the unvanquished victor , holding authority for seven times. And thirty-six times I was Sakka, king of the devas, and many hundred times I was a universal monarch, a just and righteous king."
Some people held the notion that beings from the deva planes are permanent and real while beings in the human planes are not. In the Buddha's teaching all the planes are considered samsara, and that includes all the deva planes also. An awakened being is liberated from all these planes that make up samsara. He is neither identified with being a deva or human, but Awakened. In other words, Buddha.
When it comes to identification with being such and such being in a human or deva plane, these identities are always changing and neither can be considered our true self. In one life he was a Sakka the ruler of the deva, in another life he was a Brahma, yet another he was a king in the human plane, so which one is the true identity. In certain religion, people say the human identity is temporary yet the deva identity is the permanent and true one. However, in the Buddha's teaching both are impermanent( temporary) and not to be identified with as self. There is no self at any point for that matter. Once awakened , these identifications are abandoned, be it human or god identity.
The Buddha said:
"Remember me, brahmin, as 'awakened.'
- Dona Sutta