EDIT
I have received interesting comments to my post. Especially the comment of @Martin Hopf showed that this problem is a "classic" and by no means new.
Here is Eric Weissten's article on "squareful (nice term!) numbers" https://mathworld.wolfram.com/Squareful.html from which you can find the topic exposed.
This article https://arxiv.org/pdf/1210.3829.pdf is an exhaustive study of the problem.
Original post
Consider the subset of the natural numbers $n\ge 1$ which have at least one square prime factor. These can be formally defined by $\mu (n) = 0$, where $\mu$ is the Möbius function.
The first 40 of these are
$$s_{0}=\{4,8,9,12,16,18,20,24,25,27,28,32,36,40,44,45,48,49,50,52,54,56,60,63,64,68,72,75,76,80,81,84,88,90,92,96,98,99,100,104\}$$
Closer inspection of $s_{0}$ shows that there are sequences of consecutive such numbers. We call them compact sequences. If sorted by the length $m$ of the compact sequence we find in $s_{0}$ the following
$$m=2: \{8,9\}, \{24,25\}, \{27,28\},\{44,45\},\{48,49\},\{49,50\},\{63,64\},\{75,76\},\{80,81\},\{98,99\},\{99,100\}$$ $$m=3: \{48,49,50\}, \{98,99,100\}$$
We see that for a given length $m$ there is more than one sequence, and that for the given length 40 of $s_{0}$ there are no sequences with length $m\gt3$.
Prolonging the list $s_0$ we find also longer compact sequences, and, again, for a given length there is more than one sequence.
Quoting only the first member of the first appearance of the corresponding sequence I found numerically in the format $\{m,\text{first term of first appearance}\}$
$$c=\left( \begin{array}{cc} 2 & 8 \\ 3 & 48 \\ 4 & 242 \\ 5 & 844 \\ 6 & 22'020 \\ 7 & 217'070 \\ 8 & 1'092'747 \\ 9 & 8'870'024 \\ 10 & 221'167'422\\ \end{array} \right)$$
Remark: this sequence is contained in OEIS (https://oeis.org/A045882). Thanks to @Martin Hopf for pointing this out in a comment.
Conjecture
(1) there is a compact sequences for any given length and
(2) there are infinitely many compact sequences for any given length
Unfortunately, I was not able to prove or disprove the conjecture. Can you do better?
Additional question
(3) can you devise a formula for the first appearance of the compact series for given $m$?
Letting $p_1,\dots,p_m$ be distinct primes. Then, using Chinese remainder there, find $x$ such that:
$$x\equiv -i \pmod{p_i^2}$$
Then $p_i^2\mid x+i$ for $i=1,\dots,m.$ and there are infinitely many such $x.$
(This assumes you don’t require $\mu(x)\neq 0$ and $\mu(x+m+1)\neq 0.)$
But it does mean we can get arbitrarily long consecutive sequences.
The smallest for a particular $m$ is probably tricky. This is similar to the case where $x+1,x+2,\dots,x+m$ are all non-primes. It is easy to show that such $x$ exists, but it is hard in general to find the smallest $x$ for a given $m.$