Perfection is not something mankind can achieve. It will be accomplished/finished, for those who are Christ's, when he returns.
Another aspect of perfection is completion.
For it was fitting for Him (God), for whom are all things, and through whom are all things, in bringing many sons to glory, to perfect (or finish) the originator of their salvation (Jesus) through sufferings. Heb 2:10
Although He was a Son, he learned obedience from the things which he suffered. 9And having been perfected, he became the source of eternal salvation for all those who obey him Heb 5:8
Mankind is destined from before creation to suffer and to experience sin and through salvation in Jesus, be finally made complete and without sin. As you have pointed out - having sinlessness does not ensure an eternal continuance. By experiencing the horrors of sin, man will be set against it and never go there again.
No one born of God makes a practice of sinning, for God’s seed abides in him; and he cannot keep on sinning, because he has been born of God. 1John 3:19
This too looks forward to the time of Jesus' return and the change that will take place to make believers immortal and forever with the Lord and God.
Dear friends, now we are children of God, and what we will be has not yet been made known. But we know that when Christ appears, we shall be like him, for we shall see him as he is. 1John 3:2
All creation will have opportunity to be completed - made perfect, but only through Christ. His journey of suffering and completion is a type for all men. He succeeded where all others have failed because he loved and trusted in his God
During the days of Jesus’ life on earth, he offered up prayers and petitions with fervent cries and tears to the one who could save him from death, and he was heard because of his reverent submission. Heb 5:7
His sinlessness did not make him complete, it was necessary so he could be the perfect, unblemished sacrifice. But he could only be the perfect sacrifice if he remained true to his Father and his Father's will up to the during the crucifixion - being tempted, yet without sin.
Matthew 5:48 speaks of this perfection that will be achieved by fiat, but learned by the living out of humility, service and worship once God places His spirit in us. Our new lives (with the spirit deposit) are analogous to the "days of Jesus’ life on earth" as he struggled to live out God's will for him. He receiving his change into spirit and immortality at his resurrection - as believers also will.
Perfection is not our goal - it is God's goal in Christ, and as Jesus expressed, we are to live according to God's will in a repentant and humble attitude knowing but for grace - expressed through Jesus, we would never have a life after this no matter how hard we might try.