One thing in this game is that light does not directly affect monster spawn rate (unlike Minecraft) One thing that I found consistent in my research is that there is no straightforward way to remove mobs from your base. There are not very clear rules.
Some people found that placing a bed in their base with lighting might help. That is because a bed has a big AoE.
Post From Here!
Other people from Reddit found it that a completely enclosed room will not have mobs spawning (background and foreground blocks are player placed). Find it here!
I found that there was a command to stop spawning
/admin first then do
/disableSpawning. If you want spawning again do
/enableSpawning. I have not personally tested this method and some players may consider this cheating.
This game has been around for almost a year and players are not yet sure about spawn mechanics. I am not sure about the EXACT RULES but the "enclosed space" trick worked for me. Sometimes game developers like to keep some game mechanics secret for reasons like player attraction, speculation, social media rampage, e.t.c!.