The OP was right to suspect something was amiss.
In Matthew 1:18, the author writes εκ πνευματος αγιου, which the KJV translators render as "of the Holy Ghost".
In Matthew 1:20, the author writes πνευματος εστιν αγιου, which the KJV translators also render as "of the Holy Ghost".
This is not sensible. No author intending the same thing, would construct something different within the space of a couple of sentences. So, what does the author mean by what he has written in verse 20?
εστιν αγιου is unique in the Greek scriptures (LXX+GNT). However, there are a number of examples of εστιν + GENITIVE.
ενοχος | εστιν | αιωνιου | κρισεως
in danger | he is | of eternal | damnation
1 Corinthians 6:20
και | εν | τω | πνευματι | υμων | ατινα
and | with | the | spirit | of you | as
εστιν | του θεου
it is | of God
1 Corinthians 14:3
ου | γαρ | εστιν | ακαταστασιας | ο | θεος
not | for | he is | of confusion | the | God
αλλ | ειρηνης
but | of peace
1 Timothy 5:8
την | πιστιν | ηρνηται | και | εστιν | απιστου | χειρων
the | faith | he has rejected | and | he is | (an) heathen | most evil
1 Timothy 5:8 is the most relevant because what follows εστιν is a genitive adjective that has been deployed as a noun.
εστιν + GENITIVE is not common in the GNT, but there is clear evidence for its use to have been deliberate in Matthew 1:20.
So, what can be said about αγιου?
In Isaiah 60:14 the LXX has αγιου ισραηλ for the Hebrew יִשְׂרָאֵֽל ְד֥וֹשׁ, which in the KJV is given as "of the Holy One of Israel"
In Jeremiah 3:16 the LXX has αγιου ισραηλ ("of the Holy One of Israel") for the Hebrew יְהוָ֔ה, which in the KJV is given as "of the LORD".
It is quite obvious that the LXX translators saw αγιου ("the Holy One") as a fitting representation of "Yahweh"
In Jeremiah 3:21 the LXX has επελαθοντο θεου αγιου αυτων, where θεου is given for אֱלֹהֵיהֶֽם (Elohim) and αγιου is again given for יְהֹוָ֥ה (Yahweh).
Which for Matthew 1:20 gives:
You should not be afraid to take to you Mary your wife; for the one being conceived in her out of Spirit, is of the Holy One.
For those who still can't see the relationships between the phrases, the following may be helpful:
Whether one uses "s" or "S" for "spirit" is moot, because all "spirit" has its source in God ("the Holy One")
This argument, of course, gives cause to rethink the whole notion of the use of πνευματος αγιου. It is rendered as "the Holy Ghost" or "the Holy Spirit" in all translations with which I'm familiar, and that's fine, as long as one understands that it is representative of "the spirit of the Holy One"