Starting with macOS Sonoma you will see an indicator under the text cursor when you have Caps Lock turned, are using dictation, or have just switch keyboard input types. Here's more about this and how you can turn it off if you really want to.
Here is the Terminal command:
sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor -dict-add Enabled -bool NO