A positive irrational number $\alpha$ such that $\lfloor k^n \alpha \rfloor$ and $M$ are always coprime?

From my previous question: Is it true that there always exists a positive integer $n$ such that $p | ⌊k^n⋅α⌋$ , I came up with a similar question:

Given a positive integer $$k$$ such that $$k>2$$, $$k-1$$ is not squarefree. What are the conditions of the positive integer $$M$$ so that there exists a positive irrational number $$\alpha$$ such that for every positive integer $$n$$, $$\lfloor k^n \alpha \rfloor$$ and $$M$$ are always coprime?

If $$gcd(M,k)=1$$, then let $$s=ord_M(k)$$. Let $$a_1,a_2,...$$ be positive integers less than $$k$$ such that $$gcd(a_1+a_2+...+a_i,M)=1$$ for every $$i$$. Choose $$\alpha=\frac{a_1}{k^s}+\frac{a_2}{k^{3s}}+...+\frac{a_j}{k^{\frac{sj(j+1)}{2}}}+...=\overline{0.00...0a_10...0a_20...}_k$$ in base k.

Then for every $$n$$, $$\lfloor k^n \alpha \rfloor \equiv k^l(a_1+a_2+...+a_i) \mod(M)$$ for some positive integer $$l$$ and $$i$$, thus satisfy the condition.

If $$M$$ is a prime number such that $$M|k$$, then let $$c$$ be a positive integer different from $$1$$, is not divided by $$M$$ and less than $$k$$. Choose $$\alpha=\overline{0.1c11cc111ccc...}_k$$ in base k.

Then for every $$n$$, $$\lfloor k^n \alpha \rfloor \equiv 1$$ or $$c\mod(M)$$, therefore $$\lfloor k^n \alpha \rfloor$$ and $$M$$ are coprime.

However, if $$M$$ and $$k$$ are not coprime and $$M$$ is not a prime, then are there any conditions so that for every positive integer $$n$$, $$\lfloor k^n \alpha \rfloor$$ and $$M$$ are always coprime ?

Moreover, are my solutions above correct? More specifically, if, for example, $$\overline{0.abcde...}_{10}$$ (decimal form) is irrational, then is $$\overline{0.abcde...}_k$$ (in base $$k$$) coprime ?

(Please let me know if this question should be closed, off-topic or unclear. I may not visit this page frequently, so I may not be able to know what is going on. Sorry for this inconvenience. Any answers or comments will be appreciated)