Many threads here have devoted themselves to this question, with experts arguing in great details.
In my mind, I simplify the question this way: when RE Lee was on offense in Pennsylvania, his losses were percentage as high as US Grant's on offense in Virginia.
It made a big difference to a weaker force if they could dig in prepared defenses shooting down from a hillside.
In Pennsylvania, Lee was without the services of Stonewall Jackson who had died. Jackson was a particular genius in getting the jump on his Northern opponents by getting to the scene of battle in the middle of the night and striking early. With Jackson dead, US Brigadier General John Buford, Jr., was the indispensable officer who arrived first at Gettysburg, correctly intuited the locale where the battle would be fought and arranged for the Northern forces to hold all of the best strategic points to facilitate victory over the Army of Northern Virginia. Lee should not have fought there but he did and Pickett's Charge (a total disaster) is to be laid to Lee in his incredible stubbornness. Together with Grant taking Vicksburg and with it controlling the Mississippi, Gettysburg sealed the fate of the Confederacy. That Lee held out for nearly two more years is a testament to his quality as an officer but Gettysburg was a guarantee that his efforts would fail.
When Grant was on offense in Virginia or anywhere, he seemed not to care as much about casualties as he did about prompt and effective results. Given the outcome, it is hard to disagree with his tactics. I regard him more highly than I used to. He was a decent man in the presidency. He was quite the generous victor in his reception of Lee at Appomattox. He cannot very well be blamed for his enthusiasm as a commander or for his results.
Of all the Civil War generals, the one who had the highest percentage of his men become casualties was... RE Lee.