When you index out an element, you are simply making sure that a particular activation at the end does not contribute to the loss function and subsequently does not contribute to changing the weights and biases. This would not break backprop. To illustrate this point with code:
import torch
import torch.nn as nn
import torch.nn.functional as F
batch_size = 6 ### Any arbitarary number
fc1 = nn.Linear(12,3)
input = torch.randn(batch_size,12) ### Making sure the second dimension is qual to 12
target = torch.randn(batch_size,2)
output = fc1(input)[:,:-1]
loss = F.mse_loss(output,target)
loss.backward()