Had this issue for a while and couldn't figure it out, until I started a few new games and noticed that tier 0 constructors do not suffer from this bug. The reason? Some of my late model constructors are outfitted with survey modules, and it messes up something in the clickable UI in the command window (below). I believe it's because nobody thought you'd have that many clickable entries on a single ship, so it just doesn't recognize the top entry as a button. You can still use the hotkey B to issue a build starbase command, so It isn't that my design breaks something bigger, just a simple UI bug.

How to reproduce:
- edit the stock constructor (terran in my case, should be the same for other civs) in the shipyard designer
- remove the sensor module, attach a survey module of any kind - you may need the first miniaturization tech to be able to do this, or simply remove all engines/support from the ship
- your ship is built, you can issue all other commands but can't click on Construct Starbase. Even when mousing over the button, no yellow outline or hotkey tooltip appears.
- use the hotkey (default B ) to build a starbase because there isn't another way to do it