There is a difference between avoiding attention and serving the villain you know?
If it is the case like Death March the mc would just hide behind the screen or disguise and do the things without anyone knowing it's him.
Which one of those mc would become an underling for the prince, not to mention abandon his friend?