Hello theukdeans,
Let's use the steps below to boot your iMac into safe mode to see if that behavior still persists from there:
1. Shut down your Mac.
2. Press and hold the power button on your Mac. As you continue to hold the power button, your Mac turns on and loads startup options. When you see Options, release the power button.
3. Select your startup disk. It's named Macintosh HD, unless you changed its name.
4. Press and hold the Shift key, then click the “Continue in Safe Mode” button below your startup disk.
5. Log in to your Mac. You might be asked to log in again.
You can also find those steps in this resource: Use safe mode on your Mac - Apple Support
It can take a few extra minutes to boot into safe mode. Your screen may flash or flicker while in safe mode. Those behaviors are expected. Testing in safe mode runs a check on your disk, removes some cached files, and can help isolate conflicts with startup items. Once you've tested that behavior in safe mode, you can restart to leave safe mode.
Let us know your result, and we'll keep moving forward from there.