With a fan + remote, you have two chocices: Wire it so fan+light are controlled by remote, and ou can't use a dimmer. (can't dim the fan). Or, have fan controlled by remote and light controlled by switch, which can be a dimmer if it doesn't affect the fan.
Code requires a light switch in a room that works
You may have noticed that when you go into almost any room anywhere, your arm knows exactly where to look for the light switch. That's no accident; it's carefully enforced.
So the wall switch has to control something. If the fan light were the only option, then the electrician would have to have chosen the "light by switch, fan by remote" option.
There is no way to have it both ways. Especially not with a pre-existing dimmer; that's not possible in any way whatsoever. These things simply will not play together. They are incompatible. Careful selection of control module, wall switch and remote, from a single product line designed to do that, may be possible.