What exactly is the difference between these two phrases. How does けど/が affect the meaning and how does it relate to its meaning of 'but'?
The が・けど makes you sound more modest and tentative/hesitant.
The difference between the two is the percentage of conviction in what you are saying.
Ending sentences with です usually indicates 100% of conviction.
On the other hand, sentences ending in といいんですけど would be lower than 100%.
Though the two phrases would mean the same thing, the nuance is slightly different.
Note: Sometimes ですけど can just be used as a conjunction while speaking, without any nuance of "but". It really depends on the entire context of the conversation.