Just as you said, the reason why your external hard drive with the Time Machine backups can't be safely ejected may be because the external hard drive is currently in use by Spotlight. Therefore, to fix this problem, the very first thing you should do is to quit or force-quit the Spotlight app on your Mac.
To close running apps on your Mac, you can use Activity Monitor help you. Launch Activity Monitor and type in 'Spotlight', then all the Spotlight running processes will appear. Select each process one by one and click the X button in the top left corner of the window to quit or force quit the Spotlight.
If the problem still exists, and you don't want to fix "The external disk can't be ejected on Mac" by shutting down your Mac computer every time, you can eject the disk with an automatic ejection tool - iBoysoft NTFS for Mac.
Even though iBoysoft NTFS for Mac is mainly designed for mounting Windows NTFS file system drives on Mac, it can also be used to fix the 'external drive won't eject on Mac' issue.
- Free download and launch iBoysoft NTFS for Mac.
- Wait for it to detect your Time Machine disk with the ejecting issue.
- Click the iBoysoft NTFS for Mac icon in the menu bar, select the drive from the drop-down list, and choose Eject.