How is chainstay length defined for frames with horizontal dropouts?
If I'm describing a complete bike, it's defined by wherever the center of cogs are at that time.

As we move into this bold world of full suspension mountain bikes with adjustable geometry, the ones with flip chips on the dropouts talk about the varying lengths of the chainstays.

Santa Cruz's description of their Megatower frame (emphasis mine)


  In order to make the Megatower stride confidently across the globe it has an enormous amount of clever adjustability hidden in its bones. A tidy and concealed flip chip in the lower-link adjusts bottom bracket height and changes progressivity of the rear suspension. A second, in the rear dropouts, allows for a 10mm fore-aft adjustment in chainstay length to dial in the rider's rearward weight distribution - either set for play or for stability. The flip chips are a robust mechanism for riders looking to tune their ride according to their needs without compromising reliability and durability. No wackadoo mousetraps and frail proprietary shocks here.


from: https://www.santacruzbicycles.com/en-US/megatower

So in the case of horizontal drop outs, I would provide the range of reasonable lengths, or measure to the center of the dropout and provide the available adjustment if I was describing only the frame.