Only the first object becomes نائب الفاعل.
حُسِبَ مَحْمُودٌ عَالِمًا — Mahmood was considered a scholar.
● مَحْمُودٌ was the first object; it becomes the nominative نائب الفاعل.
● عَالِمًا is the second object; it remains accusative.
So do not raise both objects when converting this type of sentence.