I don't think accepting a less appealing role automatically means giving up on your long-term goal. Sometimes it can be a practical way to build recent experience, expand your network, and keep your confidence up while you continue applying for the role you really want. The key, in my view, is to treat it as a stepping stone rather than a destination. If the position helps you develop relevant skills, it can actually make you a stronger candidate for your preferred role later on.