You are correct; the darkness would disappear when the object disappears, but when it comes back, the darkness would come back.
the darkness emanates from the object
So if the darkness cannot emanate from the sword, there is no darkness while it has disappeared.
I would assume that the darkness spell would continue to exist if the object disappeared, as the darkness comes from the sword, and the sword still exists, unlike the question you referenced. There is no ending condition for the darkness spell, other than it overlapping with a higher-level spell that gives off light and the concentration from being broken. The object still exists, so when it comes back, it will give off darkness.