Voyager and Buffy were both being used as a method of attempting to prop up a network -- UPN -- that was doing horribly. They had a secondary purpose beyond selling advertising dollars on their particular programs. In addition, Paramount was not the one losing money on Voyager, UPN was. Yes, I know they were under the same corporate parent, but they were separate entities. UPN paid Paramount the licensing fee for all seven years of Voyager. I assure you Paramount turned a profit.
Deep Space Nine was syndicated, however. Paramount had absolutely nothing to gain by letting it run for seven seasons unless it was profitable for them. They had, as has been discussed here, decreasing net profit as the audience figures declined. But I guarantee you they never lost money on the show.