The Scots started the match sluggishly and allowed their opponents to take the lead with the first clear-cut chance of the night in the 14th minute.
Sunderland's Bryan Oviedo picked out Marco Urena in the penalty area with a measured cross, and the striker bundled the ball beyond Allan McGregor with a low shot from close range to break the deadlock.
Costa Rica came out flying in the second period and hit the woodwork moments after the restart as Sporting Lisbon's Bryan Ruiz gave Andrew Robertson the slip and crashed a fierce strike against the crossbar.
The Tartan Army applied pressure through McBurnie moments later, though the Swansea City striker's shot on the turn was lost in a sea of Costa Rican bodies.
Scotland showed some improvement after the hour mark and almost drew themselves level in the 65th minute after Callum McGregor sent Ritchie clean through on goal, but Navas came racing off his line to tip the midfielder's shot over the crossbar.
Scotland's final chance to equalise fell to Robertson four minutes from time, the Liverpool defender getting his head to Paterson's looping cross, but failing to find the target.
The Scots, who travel to Hungary for their next international friendly, were booed off at the final whistle.
SCOTLAND (5-4-1): McGregor; Paterson, Robertson, Hanley, Mulgrew (McGinn 82'), McKenna; McTominay (Armstrong 58'), McDonald, Cairney (McGregor 58'), Ritchie (Murphy 87'); McBurnie (Phillips 77')
COSTA RICA (5-4-1): Navas; Gamboa (Smith '75), Gonzalez, Acosta, Duarte, Oviedo (Calvo 78'); Colindres (Wallaceat 64'), Borges, Guzman (Tejedaat 56'), Bryan Ruiz; Urena (Ruizat 69')