How do I get multiple data-attributes from a single option select assigned to different javascript variables?

I am trying to assign 2 different javascript variable values from multiple data-attributions in a dropdown menu. One value is working just fine, the other keeps returning null. Any suggestions would be greatly appreciated!

Example of an option line from html form:

<select onchange="calculateNPF()" id="yourCamera" name="yourCamera" class="form-control">

<option value="79" data-sensor-width="36" data-sensor-height="24" data-cropFactor="1" data-pixelPitch="6.6" data-resolution="20.1">Canon EOS R6</option>
let yourCameraPixelSize = document.getElementById('yourCamera');
let pixelSize = yourCameraPixelSize.getAttribute('data-pixelPitch');
let yourCameraSensorSize = document.getElementById('yourCamera');
let sensorSize = yourCameraSensorSize.getAttribute('data-cropFactor');

In the above code “pixelSize” is working properly whereas sensorSize returns null