Believe or not, this flaw is the #1 time waster for me in my day to day work. To get the default export folder to be the same folder as the source file, I ended up making AppleScripts and embedding them in services using Automator. I did this for pdf and Word exports in Pages, pdf and Excel in Numbers, and pdf, PowerPoint, and png in Keynote.
Attaching the code below--for each, you need to create a new "Quick Action" (service) in Automator, add a "Run AppleScript" step, set it to receive no input, and set it to work in the specific app for the script. You need to save each service under a different name (e.g. "Pages Export to pdf", "Keynote Export to PowerPoint", etc.) since even when made specific to an app services are global. As an optional last step I assigned keyboard shortcuts to them in each app (System Preferences → Keyboard → ...). Note if you do this you probably need to assign the shortcuts at the app level, not at the service level, since service shortcuts apparently cannot be duplicated.
Disclaimer I'm not exactly amazing at Applescript so these might not be perfect--but they seem to work well enough for me.
Default Folder X seems like nice software but it does much more than just fix this one flaw, so it's a bit overkill. And if you don't want the rest of what it does, you can't disable that but still have it solve this problem.
Apple should fix this properly.
tell application "Pages"
set exportFile to file of front document as text
set exportFile to text 1 thru -6 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Pages"
set exportFile to file of front document as text
set exportFile to text 1 thru -6 of exportFile
set exportFile to exportFile & "docx"
export front document to file exportFile as Microsoft Word
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Numbers"
set exportFile to file of front document as text
set exportFile to text 1 thru -8 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Numbers"
set exportFile to file of front document as text
set exportFile to text 1 thru -8 of exportFile
set exportFile to exportFile & "xlsx"
export front document to file exportFile as Microsoft Excel
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -4 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {PDF image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -4 of exportFile
set exportFile to exportFile & "pptx"
export front document to file exportFile as Microsoft PowerPoint
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -5 of exportFile
export front document to file exportFile as slide images with properties {image format:PNG}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
Pages
function or bug. This is a problem one encounters with every application. When you are working with different folders and not saving everything within a uniq huge bulk folder, every application wants to save a new file where you did it the last time and never where you are working right now.