In CPA, how does one-message security implies multi-message security? I am learning modern cryptography and recently we reached the CPA mechanism.
In CPA game setting, A sends two messages to C and then C randomly chooses one message and encrypts it and sent the encrypted text back to A, then A will determine which one of the two messages is chosen by C.
However, if A sends two identical messages, say 'm', to C, A would definitely know the encrypted 'm' by the returned text of C. Then, for the second time, A can send a 'm' and any other message to C, then, if the returned text of C is the same as that of the returned text when inputting 'm', the message chosen by C is 'm', otherwise is that any other message. And this enables A to have a probability of 1 to guess the chosen message of C.
So, it seems that one-message security doesn't imply multi-message security, even in the one-message security scheme, if the two sent messages from A are the same, A still has a probability of 1 to guess the chosen one of C.
Could anyone help me in understanding this?
Thank you for the answering!
For the CPA game, we play the following experiment

Generate a key $k$ with the security parameter $n$
The adversary $\mathcal{A}$ is given the $n$, Oracle access to the encryption oracle $Enc_k(\cdot)$
$\mathcal{A}$ outputs two messages $m_1$ and $m_2$ of the same length ( here, there is no restriction about $m_0 \neq m_1$)
A random bit is chosen $b \overset{R}\leftarrow \{0,1\}$ the the ciphertext $c = Enc_k(m_b)$ is computed and trasnmitted to $\mathcal{A}$. This is called the challange ciphertext.
$\mathcal{A}$ access to the encryption oracle $Enc_k(\cdot)$ ( even before  submitting)
And, finally, $\mathcal{A}$ submits $b'$ as their candidate
The output of the experiment is defined to be $1$ if $b' = b$ and $0$ otherwise. If the output is $1$, we also say that $\mathcal{A}$ succeeds.

Then we can make the definition of $Ind\text{-}CPA$ as;
An encryption scheme is  $Ind\text{-}CPA$ if for all probabilistic polynomial-time adversaries  $\mathcal{A}$ the advantage is negligible $negl(n)$
Notes:

The negligible is depends on the security parameter $n$
There is no restriction for submitting the same messages. The adversary must find the correct $b$.
If you send two identical messages there is no advantage since the adversary will not learn anything.
CPA security requires randomized encryption. Deterministic encryption like ECB mode cannot have CPA security.
The experiment also requires a good random number generator.
In public-key cryptography, the encryption oracle  $Enc_k(\cdot)$ is free. One can access all the time they have, consider encrypting with RSA's public key.
The key is fixed during the experiment (Step 1)


However, if A sends two identical messages, say 'm', to C, A would definitely know the encrypted 'm' by the returned text of C. Then, for the second time, A can send a 'm' and any other message to C, then, if the returned text of C is the same as that of the returned text when inputting 'm', the message chosen by C is 'm', otherwise is that any other message. And this enables A to have a probability of 1 to guess the chosen message of C.


You know the $m$ but which $b'$ will you submit to win the game?
For the second time the encryption of the $m$ will change since the CPA game requires randomized encryption, in other terms any CPA-secure encryption scheme must be probabilistic. In which, random coins tossed in order to ensure that two encryption of the same message is different.