First, it is not true that BOTH versions 1 and 2 are ungrammatical. In version 1, “like” is a verb and the clause starting with “that” is the object of the verb. Only version 2 is ungrammatical.
Versions 3 and 4 are grammatical. Such sentences are usually discussed in a very unhelpful way: with “my” indicating that “speaking” is a gerund and “me” indicating that “speaking” is a participle.
There is no difference in form in English between a present participle and a gerund. It is importing into English an observable difference that exists in other languages, but it is not observable in English. It has some small value analytically, but is otherwise of minor significance.
So, it is more helpful to view the choice between “me speaking,” where analytically “speaking is a participle being used as an adjective to modify “me,” and “my speaking,” where analytically “speaking” is being used as a noun modified by “my,” as differing in emphasis. Both are grammatical, but convey slightly different nuances: the first emphasizes the actor “me” whereas the second emphasizes the action “speaking.” Neither is wrong; which is better depends on the meaning to be conveyed.
Unfortunately, when we shift attention to subjects of clauses, “I speaking” is just not idiomatic, and “me” as a subject is not grammatical. You can say “My speaking is …”, or you can say “I, when speaking, am …”. So, the difference in form between a participle used as a gerund that is a subject and a participle used an an adjective modifying a subject is more noticeable than just the difference between “me” and “my.” But both options are still grammatically possible.
In short, the choice between using a participle as a noun (a gerund) or as an adjective is not constrained by grammar. It is determined by where emphasis is to be placed, on actor or action. Grammar permits both.
EDIT: In response to a comment by the original poster, I am making this clarification to my answer.
The original poster had correctly been told that the verb “like” is transitive and requires a direct object. The original poster had also been incorrectly told that a clause cannot act as the direct object of a verb.
I see that you got a new puppy
is perfectly grammatical as is
I see you got a new puppy
Version 1 is grammatical. But what I did not point out is that what is also grammatical in American English are forms like:
I love it that …
I like it that …
I hate it that …
According to Ngram, the “it” form is less common in modern American written English:
https://books.google.com/ngrams/graph?content=I+like+that+he%2C+I+like+it+that+he&year_start=1800&year_end=2019&corpus=28&smoothing=3&direct_url=t1%3B%2CI%20like%20that%20he%3B%2Cc0%3B.t1%3B%2CI%20like%20it%20that%20he%3B%2Cc0
My strong impression, however, is that the “it” form is far more common in speech, but that purely personal impression may be due to some peculiarity in the English of my region of the U.S.