You can fill all the 4 slots but then at some point, it becomes possible for front and rear to point the same slot in the array which is an overflow/underflow condition and leads to confusion whether the queue is empty or full.
That is why we only use (n-1) slots to implement a queue using an array of size n.