1- Allah being merciful is in reality an attribute of His action. When God creates us and blesses us, and we benefit, His action is described as being merciful. Mercy is not an essential attribute like knowledge or power. Allah has knowledge and power regardless of whether any creation exists or not. Rahman takes shape when He creates and blesses. Now the objection is that he “needs” his creation to be given this title. The answer is that he doesn’t need this title. Without this title there is no deficiency in him. You are considered a dependent if you need something else for your completion. Otherwise it’s not a need. If Allah needed his creation for power or knowledge then he’d be deficient and dependent. But mercy is different.
2- Allah has a “nature” of being merciful. He still possesses this title even if there was no creation because his nature is one that exudes mercy. To bring the idea closer, some people are generous by nature. Whether there is someone whom they show generosity to or not, they’re still generous. Their self is generous. Their nature is generous. They can spend decades alone in a cave, yet they still possess the title of being generous.