You ignoring that Cornelius was a righteous man by Jesus obedience
Nothing is stated about Cornelius being a righteous man by Jesus obedience before his Acts 10 experience.
What you ignored
Acts 11:12–14 (LEB) — 12 And the Spirit told me to accompany them, not hesitating at all. So these six brothers also went with me, and we entered into the man’s house. 13 And he reported to us how he had seen the angel standing in his house and saying, ‘Send to Joppa and summon Simon, who is also called Peter, 14
who will speak words to you by which you will be saved, you and all your household.’
BTW the they were Cornelius's men
Acts 10:17–22 (LEB) — 17 Now while Peter was greatly perplexed within himself as to what the vision that he had seen might be, behold, the men who had been sent by Cornelius, having found the house of Simon by asking around, stood at the gate. 18 And they called out and asked if Simon who was also called Peter was staying there as a guest. 19 And while Peter was reflecting about the vision, the Spirit said to him, “Behold, men are looking for you. 20 But get up, go down, and go with them—not hesitating at all, because I have sent them.” 21 So Peter went down to the men and said, “Behold, I am he whom you are looking for! What is the reason for which you have come?” 22 And they said, “Cornelius, a centurion, a righteous and God-fearing man—and well spoken of by the whole nation of the Jews—was directed by a holy angel to summon you to his house and to hear words from you.”
Cornelius however was granted the repentance leading to life
Acts 11:15–18 (LEB) — 15 And as I was beginning to speak,
the Holy Spirit fell on them, just as also on us at the beginning. 16 And I remembered the word of the Lord, how he said, ‘John baptized with water, but
you will be baptized with the Holy Spirit.’ 17 Therefore if
God gave them the same gift as also to us when we believed in the Lord Jesus Christ, who was I to be able to hinder God?” 18 And when they heard these things, they became silent and praised God, saying, “Then
God has granted the repentance leading to life to the Gentiles also!”