Let $G:=(V,E)$ be a simple undirected graph. Let $\bar{G}$ denote the complement of $G$. Let $c:V\rightarrow \{1,2,...,\chi(\bar{G})\}$ be a proper coloring of $\bar{G}$. It is clear that the sets of verticies $c^{-1}[\{1\}],c^{-1}[\{2\}],...,c^{-1}[\{\chi(\bar{G})\}]$ are independent in $\bar{G}$. Assume that for all $i\in \{1,2,...,\chi(\bar{G})\}$, the elements of $c^{-1}[\{i\}]$ are:
$$\{v^{(i)}_1, v^{(i)}_2....,v^{(i)}_{|c^{-1}[\{i\}|}\}$$
It is easy to see that the set below is a matching for $G$: $$ \cup_{i=1}^{\chi(\bar{G})}\cup_{j=1}^{\lfloor {\frac{|c^{-1}[\{i\}|}{2})}\rfloor}\{\{v^{(i)}_{2j-1}, v^{(i)}_{2j}\}\}...(1)$$
Question: Is the set in $(1)$ a maximum matching for $G$ ?
Thank you
Answer is no. Let $G$ be a graph such that $\bar{G}$ is the graph in the picture. It is clear from the picture that $\chi(\bar{G})=2$. We will properly color $\bar{G}$ using the colors red and blue. Let $V_{red}=\{a,b,c\},V_{blue}=\{1,2,3\}$ be the set of red and blue vertices respectively. The matching which you describe in formula (1) in your question can be taken as (after numbering the vertices):
$$\{\{2,3\},\{b,c\}\}...(2)$$
(We took the edge $\{2,3\}$ from the independent set $\{1,2,3\}$ of $\bar{G}$ and the edge $\{b,c\}$ from the independent set $\{a,b,c\}$ of $\bar{G}$)
The matching in $(2)$ is not a maximum matching (and not even a maximal matching) of $G$ because you can easily check that $\{\{a,1\},\{2,3\},\{b,c\}\}$ is a larger matching in $G$.