I think that the questions confounds two things.
Party B files an action in small claims and party A finally caves in
and pays up. Can party B still sue/be award reimbursement for (some)
legal fees, such as the cost of filing the claim?
In this case, it might be possible to get litigation costs and fees because the suit was necessary to compel compliance. This isn't a settlement, this is a partial satisfaction of a legal obligation.
For example in the hearing if party A and B agree that the initial
dispute has been settled, can party B still demand party A pays legal
Normally, a true settlement would include terms resolving legal fees and no further demand by either party would be allowed.
For example, A and B disagreed over both the amount owed $3000 v. $5000 and the correct amount of legal fees and costs $500 v. $1500.
A typical settlement might state that A agrees to pay B $4500 in full satisfaction of the obligations between them without delineating the breakdown between damages and fees and costs, quite possibly, with the two sides interpreting that sum differently for their own peace of mind. The settlement would release any obligation of any kind arising out of the dispute and the case would be dismissed with prejudice.