If I was mafia I'd keep him alive for longer, if only to make a bandwagon on him at a later day if it starts to look inconvenient or a fellow mafia is on the chopping block. So I wouldn't care too much about him being detective or not.
So I am pretty sure none of the 2 mafias will kill him, regardless if he's town or mafia. But he is trying really hard not to pretend to be a detective anymore, so I feel like he's just a bomb trying to get off the game after screwing up and running out of excuses. We'd have to sack one player to kill him, but if he is shown as mafia we will know to look at the group that voted scav, there has to be some of his fellow teammates that tried saving him by going on scav.