I'd guess that about 95% of the time a pressure loss is caused by items
attached to the air compressor rather than the compressor itself.
I own four compressors and all of them can be unplugged and they will
continue to hold pressure for months when not in use. But, they all tend
to lose tank pressure in a day or two when I leave all of my attachments
hooked up to a compressor (dial regulator, air drier, hose reel, hoses,
quick connects, tools, etc.)
I partially solved that problem by attaching a "full port ball valve" as the
very first attachment to each air compressor's output. That is followed
by a quick connect fitting. This gives me the capability of verifying
that a compressor tank is holding pressure. It also allows me to shut
off the compressor outputs when not in use - thereby allowing me to
hold tank pressure since I tend to procrastinate tracking down slow
leaks in attachments.
Obviously, components should be reasonably good quality, should be
attached with Teflon-style tape, and should be leak-tested.
FYI: Hose reels, especially inexpensive bargains versions, are often the
source of pressure losses. O-rings should be lubed and/or replaced on
a periodic basis.