Why does Admiral Paris in the Star Trek: Voyager episode Pathfinder have 4 admiral pips on his uniform, and in the season 7 episode Inside Man have only 3 pips on his uniform?
Did he get demoted?
From Memory Alpha
Admiral Paris appeared wearing the rank insignia of a 3-star or Vice Admiral in "Persistence of Vision", then a 4-star Admiral in "Pathfinder", then 3-star again in "Inside Man." This could mean he was a Vice Admiral before Voyager left, and promoted while they were in the Delta Quadrant to full Admiral. The change in "Inside Man" was likely a costuming mistake, or he could have been demoted. But later in both "Author, Author" and "Endgame", he wears the four star insignia again.
Given no canon source to say otherwise, most likely a mistake in costume, or perhaps continuity due to the order his scenes were shot in.
It is perfectly possible for someone to go up and down in rank for various reasons.
Do you know that the United States of American has always had multiple armies? There are the armies of the Federal government and the armies of the state governments, their militias which are now the national guard.
Thus for example, General George Cadwallader of Philadelphia was at various times a brigadier general in the regular army (The United States Army) during the Mexican War, a brigadier general and major general in the Pennsylvania militia (fighting Nativist rioters in Philadelphia), a major general of Pennsylvania volunteers, and a major general of United States Volunteers in the Civil War.
For another example, Georg Armstrong Custer graduated from West Point in 1861 and was commissioned a second lieutenant in the Fifth United States Cavalry. During the Rebellion of 1961-1865 he rose to the rank of captain in the United States Army and major general in the separate organization known as the United States Volunteers. After the Rebellion ended the United States Volunteers were disbanded and Custer lost his general's rank in them. He was promoted to lieutenant Colonel of the Seventh US Cavalry in the army reorganization of 1866.
As a more recent example, a relative of mine became a colonel in the Army of the United States during World War II years before becoming a colonel in the United States Army.
There are also many different types of rank besides the normal substantive ranks.
In the 19th century non commissioned ranks included not just corporals and sergeants but also the lesser ranks of lance corporals and lance sergeants. Officers could have not just substantive ranks but also brevet ranks which had fewer, but some, perks and privileges. For example, General Custer, like many other officers of that era, had the brevet ranks of brigadier general and major general at the time of his death so he really was a general - sort of.
There are many other types of ranks used in different armed forces in different times and places, such as acting rank, local rank, temporary rank, etc. In the 20th and 21st centuries the highest permanent rank in the US army is (2 star) major general. All higher ranks are temporary and given when a general is given an assignment requiring that rank. As soon as a general no longer has a (three star) lieutenant general's or (four star) full general's assignment he reverts to the permanent rank of major general.
So out of universe the change in the number of pipps for Admiral Paris may probably be a costuming mistake, but in universe there is no reason to think it is not a perfectly normal thing for the rank of a starfleet admiral to change, sometimes downwards, from time to time. In the Next Generation people in the Federation, or at least in Starfleet, care very little for money and don't use it. So if Admiral Paris isn't paid a salary he probably wouldn't care if sometime his rank was reduced when he changed assignments or if the rank for his assignment was changed.