Well of course it is - the flux drops off as the square of the distance, but the solid angle subtended by the source drops off the same way, so surface brightness is constant, right?
Yet other galaxies don't have the same surface brightness as a star - if I look at Andromeda, which has a size on the sky similar to the Sun, it definitely has lower surface brightness. Yet it's made of stars. I know that in terms of (projected) surface area, Andromeda is mostly empty, with a little bit of area covered by stars, so the lower surface brightness must have to do with that, and the fact that the stars are unresolved by my eyeball.
What does the surface brightness of an object as a function of distance look like, including the transition from the object being resolved to unresolved?