Scream misunderstood good guy
There is a reason why Shanks stopped him and chained him up.
There is a reason why Gaban clearly warned about Loki, he warned a fucking Yonkou about him.
And there is clearly the legendary devilfruit which Oda hyped in the very beginning of this arc and we already got since that 4 very OP devilfruit yet none of them will top Loki one.
Loki is not the truly villian we always got, but he is also not the good guy.
His understanding about Nika, his warth to destroy Elbaph, the possiblity that he also defeated Gaban and gave him his scar, the fact he killed his father(reason or not, this probably changed him).
The longer Oda wait to reveal Loki true power, the higher the chance rise that he will be the villian of this arc.
Does he change his mind after his defeat, for sure! But he will became first a opponent and later became a ally.