To get rid of a floating gray dot on your iPhone, disable AssistiveTouch in Settings > Accessibility > Touch; if it's a colored dot (green/orange) or a red notification dot, you'll need to check app usage or notification settings, respectively.
I never noticed the part about it happening while calls are being made. In that case, that is perfectly normal. The orange dot means your microphone is being used. If you're on a call, the microphone is going to be used. It should go away whenever you end a call.
If you see an orange or green dot at the top of your iPhone® screen, it's an Apple® privacy feature in iOS 14 and later. Orange dot = an app is using your microphone (like Voice Memos). Green dot = an app is using your camera (or both camera and microphone, like during a video call).
You can see if someone is actively checking your location on an iPhone by checking the "People" tab in the Find My app (if you're sharing) and looking for purple arrows next to System Services in Settings > Privacy & Security > Location Services, which indicate recent access, but there's no single log for who checked your exact spot in Find My unless they are using Precision Finding, which notifies you, or you're getting alerts for misplaced AirTags. The primary way to know who has access is to review who you're sharing with in Find My, while system service arrows show if your location was used recently by iOS features.
In fact, the dot does not tell you if someone is spying on you. It tells you if the microphone (or camera if the dot is green) is active. In most cases, the use of the microphone is completely legitimate, e.g. Phone, Siri.
How to Tell If Your Phone Microphone Is Hacked
How do I know which app is using my microphone or camera? Look for the orange/green dots on iPhone and Android, or check Control Center. On Windows, check the microphone icon in the taskbar.
Tell-tale signs your camera has been hacked
The orange dot appears when an app is actively using your microphone. This could be during a phone call, while recording a voice memo, or even when you're using voice commands with Siri.
The black dot is actually a camera
If you own an Android device from the last few years, it is highly likely that the black dot at the top of your phone's screen is actually the front-facing camera. For years, the front camera on smartphones was cloaked behind thick bezels on the display.
You can see if someone is actively checking your location on an iPhone by checking the "People" tab in the Find My app (if you're sharing) and looking for purple arrows next to System Services in Settings > Privacy & Security > Location Services, which indicate recent access, but there's no single log for who checked your exact spot in Find My unless they are using Precision Finding, which notifies you, or you're getting alerts for misplaced AirTags. The primary way to know who has access is to review who you're sharing with in Find My, while system service arrows show if your location was used recently by iOS features.