The above response was brief because I was short on time, and just wanted to emphasize that materialism does not entail determinism, as you seem to think it does. Personally, however, I don’t find libertarianism very persuasive, and at the moment I think I lean towards the position known as source compatibilism.
First of all, it is helpful to understand that in current philosophical discussion, “free will” is usually defined as an ability required for someone to be held morally responsible for their actions.
Source compatibilism denies the proposition that, in order to have free will, one must have what is called leeway freedom, which is the ability to have taken an action other than the one that was taken. A frequent analogy is to a garden path, where one encounters a series of forks requiring one to choose only one path to keep following. If one has leeway freedom, then if one could go back in time to where they were at the fork in the path, it would have been possible for them to have taken a different path than the one they took.
That leeway freedom is necessary for free will was challenged by philospher Harry Frankfurt, who gave hypothetical examples that are now known as Frankfurt cases, summarized at 3:12 in this video:
The point being argued is that, in assigning moral responsibility, we primarily consider whether the agent is the source of their action, regardless of whether they are free to do otherwise.
If we assume that physical/biological determinism is true, then, a person could still be said to be exercising free will if their brain is operating such that they are aware of the possible actions they can take, and able to more or less accurately assess the likely consequences of those actions. (The person in the video who votes Democrat only because the brain device makes him do it, OTOH, would not be said to be exercising free will because the device prevented his brain from exercising these faculties. That is to say, the source of the action was the device and not the person’s brain.)
Now, someone might not be convinced by Franklin cases and argue that leeway freedom remains a necessary condition for free will to exist. TBH, I am not inclined to vigorously argue against that position. I am quite content to bite the bullet and concede that free will might not exist because leeway freedom does not exist. I don’t really see how either source compatibilism or leeway incompatibilism conflicts with any fact of the world, nor with any other philosophical or ethical beliefs I hold, unless you would care to point out any areas of possible conflict you see. Both seem like plausible positions to me.
That’s my two cents.