I found out what was going on. Under permalinks, there are optional settings:
Optional
If you like, you may enter custom structures for your category and tag URLs here. For example, using topics as your category base would make your category links like https://www.sample.com/topics/uncategorized/. If you leave these blank the defaults will be used.
Category base
Tag base
I left those blank. Once I set values for them, e.g. topics, tags. CAS worked.
For what it’s worth, I installed the plugin Query Monitor Version 2.6.8 | By John Blackbourn in order to see how the url was interpreted.