One of your premises is wrong. You claim that a deontological approach would deem both actions immoral. In fact Kantian ethics allows us to make the distinctions you need.
Kant rejected the notion that people were similar to objects and thus had a price. Kant argued that people had intrinsic worth, an inherent dignity, and were thus above all price. This obviously easily leads to the conclusion that racial profiling is an immoral act, but, importantly, it also serves to illustrate that Kant did consider all other non-human objects (such as animals) to have a price and to be suitable as a means to another end (indeed, Kant used this line of reasoning to support animal abuse for human benefits). In your second case, the object in question is not the Chinese guitar-maker, but the Chinese guitar in and of itself. This is an object with a price (literally). When deciding on whether or not to buy it, you are not (necessarily) making the assumption that the Chinese guitar-maker is bad at their craft, rather you are at all times making implicit probablistic assumptions on the quality of non-human objects, such as the education available to the Chinese guitar-maker, the materials available, the economic ressourses available, the time available to put in a good effort, and so on and so forth.
Thus, when deciding to buy the Japanese guitar, you have exploited objects as a means to an end, in the sense that you have compared two objects (Japanese guitar vs Chinese guitar) and made probablistic assumptions on other objects that came together in the making of those two original objects (education, ressourses, time, etc). At no point have you exploited another human being by making implicit assumptions on their intrinsic guitar-making capabilities.
Let's change your second case to the following.
You work for a company which makes guitars. You educate your employees suitable, you provide good ressources, finances, and plenty of time to make the best of guitars. You have an open job position, and two guitar-makers apply for it, one of Chinese descent and another of Japanese descent. Having nothing else to go by, you hire then Japanese guitar-maker since Japanese guitars are usually better than Chinese ones and so you assume the Japanese guitar-maker is better and the Chinese guitar-maker is bad or lazy or whatever.
This now seems intuitively wrong, but does Kant agree? The idea here is that you provide all the wordly objects that one needs to make a guitar, and the only thing you seek in the guitar-maker are their inherent qualities (such as intelligence, productivity, etc). Thus, when you hire the Japanese guitar-maker, you are exploiting humans as a means to another end, since you are making implicit probabilistic assumptions of the intrinsic worth of other humans and utilizing these assumptions to your own benefits. Kant would certainly disagree with your stereotypes here.