तेन गन्धर्व यक्षाणाम् देवतानाम् च रक्षसाम् |
अवध्योऽस्मि इति वागुक्ता तथेति उक्तम् च तन् मया || १-१५-१३
"Ravana said while seeking boon that, 'I shall not be killed by gandharva-s, yaksha-s, or by gods, or by other demons...' and I also said 'so be it..." [1-15-13]
Looks like Ravana didn’t ask for immunity from the trimurtis who are not really devas.
When Ravana was attacking Devaloka, Indra asked Vishnu for help in fighting Ravana. But Vishnu refused, saying that Ravana had a boon that he couldn't be killed by any god, but that he would soon incarnate on the Earth as Rama to defeat him:
“Do not fear, hear what I have to say. He is invincible by virtue of the boon, and that vicious-souled one is incapable of being vanquished even by the celestials and Asuras. Irrepressible by virtue of his prowess, that Rakshasa, with his son, shall accomplish a mighty object. O lord of celestials, even if I am requested by thee, I shall not withstand the Rakshasa, Ravana in the conflict”
Vishnu seems to think Ravana had immunity from him too and could only be killed by a mere human.
The question Was Ravana capable of being defeated by Trimurtis? Why did the preserver Mahavishnu be born as a human to kill him?
The answer should be well-sourced and the reference to Puranas, Scriptures and Bhashyas may please be highlighted.