This is not an answer, but an attempt to schematize the distinction for comprehension by me as a beginner level student.
I want to see ce que in the sense of what as consisting of a demonstrative pronoun and a relative pronoun, on the model of English that which. For example:
- C’est ce que me dit ma mère.
- It's what mother tells me.
- It's that which mother tells me.
But ce que (in à ce que) in the sense of that would consist of a pronoun and a conjunction introducing a clause so that pronoun and clause are apposite.
- Surtout ne t’attends pas à ce que je puisse te parler.
- Above all, don't expect it : that I could talk to you.
Again I don't mean that this is correct grammatical analysis or what goes on in the head of a native speaker. By them the expression is probably a single unit not subject to parsing.
If anyone comments on the scheme to tell me why it does not make sense even as a learning device, that too would be great.