According to Microsoft, Code UI is deprecated. The following blog post (from 2019) explains things and your alternatives.
coded UI unable to identify object in .net 4.8 framework using object spy
I use VS2019 and Coded UI for test automation. I was able to identify objects on .NET developed applications which were built on .NET v4.7 or prior. However, our development team update the .NET framework to 4.8 recently and since them I am not able to identify the objects using Cross Hair (keyboard shortcut Crl+i) in the Coded UI test builder. it does not give me an error it just keeps trying to identify the object and is stuck there forever. However, when I perform the recording it does record the action and I see the element properties in the UIMap.designer.cs file.
Is there is known issue or is Coded UI not compatible with the .NET v4.8 or above? Please suggest!!!
PS: we have 3 desktop applications for which we use Coded UI for test automation. It will be very difficult for us to move away from Coded UI now.