[RPG] What happens when a creature possessed by an intellect devourer is true polymorphed

dnd-5emonsterspolymorphspells

Let's assume that a new party member, already possessed by an intellect devourer, is true polymorphed into a dog by the wizard as part of his initiation ritual (and a big message that said "don't mess with me").

What would happen to the intellect devourer and/or the possessed member? Keep in mind

The intellect devourer initiates an Intelligence contest with an incapacitated humanoid

Also,

The intellect devourer is also forced out if the target regains its
devoured brain by means of a wish.

If the new member regains its brain, the intellect devourer is forced out, but the wish part makes me think that spells like regenerate won't work on restoring the brain, since technically it's a "complete" creature, not a limb. And true polymorph doesn’t regenerate parts, it literally changes the creature into another creature or object.

But,

While inside a creature, the intellect devourer has total cover
against attacks and other effects originating outside its host.

True polymorph originates from outside, but it affects everything inside and outside the target. Also, dispelling true polymorph reverts the creature to its original state with all its equipment. This might mean that the intellect devourer might be consider equipment and be absorbed, but there is this part where the intellect devourer is acting as its brain, giving the new member the status of a creature and maintaining the body alive (it is no different from a zombie, I guess).

By spending 5 feet of its movement, the intellect devourer can
voluntarily leave the body, teleporting to the nearest unoccupied
space within 5 feet of it. The body then dies, unless its brain is
restored
within 1 round.

So, keeping it as RAW as possible, what happens? Is the intellect devourer treated as an object and absorbed and, if it's absorbed, does the original regain control while polymorphed? Is it expelled? Is it treated as a single entity therefore the true polymorphed creature is still the intellect devourer on a “new host”?

Best Answer

Intellect devourer is not an object

It is an aberration of tiny size.

Nothing states, that they are one and the same entity.

Note, that it is possible to save the host. Furthermore rules state about Intellect devourer leaving the host, when he drops to 0 hp. The host and the Intellect Devourer are two seperate creatures.

How will polymorph work?

While inside a creature, the intellect devourer has total cover against attacks and other effects originating outside its host.

You cannot affect the intellect devourer itself, but only the host.

True polymorph

Choose one creature or nonmagical object that you can see within range.[...]

The only thing, you will see is once again, the host, not the intellect devourer. Accordingly, to the spell's decription, only one creature will be affected and that will be the host.

What will be the effect?

Despite the fact of being polymorphed, the host is still the same creature.

The effect will be a dog with the intellect devourer inside it's skull. Because True Polymorph usually affects mental ability scores it is possible to notice, that something is wrong, as the dog will have an Intelligence of 12, instead of 3.